From 4c78b7882506957febf4318978d31b5aaae7cced Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 16 Aug 2019 14:27:35 +0000 Subject: [lldb][NFC] Allow for-ranges on StringList llvm-svn: 369113 --- lldb/unittests/Editline/EditlineTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/unittests/Editline/EditlineTest.cpp') diff --git a/lldb/unittests/Editline/EditlineTest.cpp b/lldb/unittests/Editline/EditlineTest.cpp index eeaa0a3027e..55845aef05c 100644 --- a/lldb/unittests/Editline/EditlineTest.cpp +++ b/lldb/unittests/Editline/EditlineTest.cpp @@ -196,8 +196,8 @@ bool EditlineAdapter::IsInputComplete(lldb_private::Editline *editline, int start_block_count = 0; int brace_balance = 0; - for (size_t i = 0; i < lines.GetSize(); ++i) { - for (auto ch : lines[i]) { + for (const std::string &line : lines) { + for (auto ch : line) { if (ch == '{') { ++start_block_count; ++brace_balance; @@ -312,8 +312,8 @@ TEST_F(EditlineTestFixture, EditlineReceivesMultiLineText) { // Without any auto indentation support, our output should directly match our // input. std::vector reported_lines; - for (size_t i = 0; i < el_reported_lines.GetSize(); ++i) - reported_lines.push_back(el_reported_lines[i]); + for (const std::string &line : el_reported_lines) + reported_lines.push_back(line); EXPECT_THAT(reported_lines, testing::ContainerEq(input_lines)); } -- cgit v1.2.1