Browse Source

Util+Test: Change size_type to size_t

The specialized size_type type is just an alias for size_t.
master
Riyyi 3 years ago
parent
commit
1366bf14b1
  1. 2
      src/util/argparser.cpp
  2. 2
      test/testsuite.cpp

2
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);

2
test/testsuite.cpp

@ -34,7 +34,7 @@ void TestSuite::run()
Util::Timer totalTimer;
size_t caseFailedCount = 0;
for (std::vector<TestCase>::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;

Loading…
Cancel
Save