fix: quick_sort_3.cpp warning (#2070)

* fix: `quick_sort_3.cpp` warning

* clang-format and clang-tidy fixes for d95ac026
This commit is contained in:
David Leal 2022-10-04 10:06:15 -05:00 committed by GitHub
parent 24f68ea4db
commit 84ff18e0ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,7 +146,7 @@ static void test_int() {
}
std::cout << "Test " << num_tests << "\t Array size:" << size << "\t ";
std::vector<int> sorted = sorting::quicksort(arr, 0, size - 1);
std::vector<int> sorted = sorting::quicksort(arr, 0, int32_t(size) - 1);
if (size < 20) {
std::cout << "\t Sorted Array is:\n\t";
std::cout << sorted << "\n";
@ -169,7 +169,8 @@ static void test_double() {
}
std::cout << "Test " << num_tests << "\t Array size:" << size << "\t ";
std::vector<double> sorted = sorting::quicksort(arr, 0, size - 1);
std::vector<double> sorted =
sorting::quicksort(arr, 0, int32_t(size) - 1);
if (size < 20) {
std::cout << "\t Sorted Array is:\n\t";
std::cout << sorted << "\n";