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";