[cpp] Add -Wall compiler option to root CMakeLists
+ Resolve all warnings
This commit is contained in:
@@ -17,7 +17,7 @@ size_t Parent(const size_t &index) { return index / 2;}
|
||||
size_t Left(const size_t &index) { return 2 * index + 1;}
|
||||
size_t Right(const size_t &index) { return (2 * index) + 2;}
|
||||
|
||||
void MaxHeapify(std::vector<int> &array, size_t thisIndex, const int &heapSize)
|
||||
void MaxHeapify(std::vector<int> &array, size_t thisIndex, const size_t &heapSize)
|
||||
{
|
||||
// Get an index for the left and right nodes attached to thisIndex
|
||||
size_t l = Left(thisIndex);
|
||||
|
||||
@@ -18,7 +18,7 @@ size_t Parent(const size_t &index);
|
||||
size_t Left(const size_t &index);
|
||||
size_t Right(const size_t &index);
|
||||
|
||||
void MaxHeapify(std::vector<int> &array, size_t thisIndex, const int &heapSize);
|
||||
void MaxHeapify(std::vector<int> &array, size_t thisIndex, const size_t &heapSize);
|
||||
|
||||
void BuildMaxHeap(std::vector<int> &array);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user