From 84ff18e0ac0e6241adeb1681d07393e4153c2236 Mon Sep 17 00:00:00 2001 From: David Leal Date: Tue, 4 Oct 2022 10:06:15 -0500 Subject: [PATCH] fix: `quick_sort_3.cpp` warning (#2070) * fix: `quick_sort_3.cpp` warning * clang-format and clang-tidy fixes for d95ac026 --- sorting/quick_sort_3.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sorting/quick_sort_3.cpp b/sorting/quick_sort_3.cpp index b365144a1..72dc44d9b 100644 --- a/sorting/quick_sort_3.cpp +++ b/sorting/quick_sort_3.cpp @@ -146,7 +146,7 @@ static void test_int() { } std::cout << "Test " << num_tests << "\t Array size:" << size << "\t "; - std::vector sorted = sorting::quicksort(arr, 0, size - 1); + std::vector 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 sorted = sorting::quicksort(arr, 0, size - 1); + std::vector sorted = + sorting::quicksort(arr, 0, int32_t(size) - 1); if (size < 20) { std::cout << "\t Sorted Array is:\n\t"; std::cout << sorted << "\n";