From 1366bf14b1fcf0a0ab60965660d25fd03c4bfda4 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Mon, 6 Sep 2021 01:59:08 +0200 Subject: [PATCH] Util+Test: Change size_type to size_t The specialized size_type type is just an alias for size_t. --- src/util/argparser.cpp | 2 +- test/testsuite.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/argparser.cpp b/src/util/argparser.cpp index e4060b7..5df1032 100644 --- a/src/util/argparser.cpp +++ b/src/util/argparser.cpp @@ -57,7 +57,7 @@ bool ArgParser::parseShortOption(std::string_view option, std::string_view next) char c; std::string_view value; - for (std::string_view::size_type i = 0; i < option.size(); ++i) { + for (size_t i = 0; i < option.size(); ++i) { c = option.at(i); printf("short '%c'\n", c); diff --git a/test/testsuite.cpp b/test/testsuite.cpp index bcf878d..c3b09bf 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -34,7 +34,7 @@ void TestSuite::run() Util::Timer totalTimer; size_t caseFailedCount = 0; - for (std::vector::size_type i = 0; i < m_cases.size(); ++i) { + for (size_t i = 0; i < m_cases.size(); ++i) { printf(" START %s (%zu/%zu)\n", m_cases.at(i).name(), i + 1, m_cases.size()); m_currentTestCasePassed = true;