From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- testfiles/src/dir-util-test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testfiles/src/dir-util-test.cpp') diff --git a/testfiles/src/dir-util-test.cpp b/testfiles/src/dir-util-test.cpp index 25081771a..bac5e3cc2 100644 --- a/testfiles/src/dir-util-test.cpp +++ b/testfiles/src/dir-util-test.cpp @@ -37,14 +37,14 @@ TEST(DirUtilTest, Base) #endif }; - for ( size_t i = 0; i < G_N_ELEMENTS(cases); i++ ) + for (auto & i : cases) { - if ( cases[i][0] && cases[i][1] ) { // std::string can't use null. - std::string result = sp_relative_path_from_path( cases[i][0], cases[i][1] ); + if ( i[0] && i[1] ) { // std::string can't use null. + std::string result = sp_relative_path_from_path( i[0], i[1] ); ASSERT_FALSE( result.empty() ); if ( !result.empty() ) { - ASSERT_EQ( std::string(cases[i][2]), result ); + ASSERT_EQ( std::string(i[2]), result ); } } } -- cgit v1.2.3