Skip to content

Commit b267f1f

Browse files
Added template deduction
1 parent bded5ee commit b267f1f

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

Diff for: examples/QuickSortFloat/QuickSortFloat.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void setup()
2727

2828
Serial.println("Ordenando 100 integers");
2929
unsigned long timeCount = micros();
30-
QuickSort<float>::SortAscending(values100, 0, values100Length - 1);
30+
QuickSort::SortAscending(values100, 0, values100Length - 1);
3131
timeCount = micros() - timeCount;
3232
printArray(values100, values100Length);
3333
Serial.println();

Diff for: examples/QuickSortInt/QuickSortInt.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void setup()
2727

2828
Serial.println("Ordenando 100 integers");
2929
unsigned long timeCount = micros();
30-
QuickSort<int>::SortAscending(values100, 0, values100Length - 1);
30+
QuickSort::SortAscending(values100, 0, values100Length - 1);
3131
timeCount = micros() - timeCount;
3232
printArray(values100, values100Length);
3333
Serial.println();

Diff for: library.properties

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=QuickSortLib
2-
version=1.1.0
2+
version=1.2.0
33
author=Luis Llamas
44
maintainer=Luis Llamas
55
sentence=QuickSort Library
6-
paragraph=Arduino Library that applies the QuickSort algorithm to order an array in Arduino.
6+
paragraph=
77
category=Other
8-
url=https://github.com/luisllamasbinaburo/Arduino-QuickSort
9-
architectures=*
8+
url=https://www.luisllamas.es
9+
architectures=*

Diff for: src/QuickSortLib.h

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
1-
/***************************************************
2-
Copyright (c) 2017 Luis Llamas
3-
(www.luisllamas.es)
4-
5-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6-
7-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License
8-
****************************************************/
1+
//Copyright (c) 2016 Luis Llamas
2+
//www.luisllamas.es
3+
//
4+
//This library is free software: you can redistribute it and/or modify
5+
//it under the terms of the GNU General Public License as published by
6+
//the Free Software Foundation, either version 3 of the License, or
7+
//(at your option) any later version.
8+
//
9+
//This library is distributed in the hope that it will be useful,
10+
//but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
//GNU General Public License for more details.
13+
//
14+
//You should have received a copy of the GNU General Public License
15+
//along this library. If not, see <http://www.gnu.org/licenses/>.
916

1017
#ifndef _QuickSortLib_h
1118
#define _QuickSortLib_h
1219

1320
#if defined(ARDUINO) && ARDUINO >= 100
14-
#include "Arduino.h"
21+
#include "arduino.h"
1522
#else
1623
#include "WProgram.h"
1724
#endif
@@ -80,4 +87,4 @@ void QuickSort<T>::SortDescencing(T* data, const size_t left, const size_t right
8087
if (leftIndex<right)
8188
QuickSort<T>::SortDescencing(data, leftIndex, right);
8289
}
83-
#endif
90+
#endif

0 commit comments

Comments
 (0)