diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-08-16 14:27:35 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-08-16 14:27:35 +0000 |
commit | 4c78b7882506957febf4318978d31b5aaae7cced (patch) | |
tree | 57b4c6df88edcf2ba5ae517d0a00a993630c3067 /lldb/unittests/Editline/EditlineTest.cpp | |
parent | 213edc34922afa08f8cf070017fcd398b12f15a5 (diff) | |
download | bcm5719-llvm-4c78b7882506957febf4318978d31b5aaae7cced.tar.gz bcm5719-llvm-4c78b7882506957febf4318978d31b5aaae7cced.zip |
[lldb][NFC] Allow for-ranges on StringList
llvm-svn: 369113
Diffstat (limited to 'lldb/unittests/Editline/EditlineTest.cpp')
-rw-r--r-- | lldb/unittests/Editline/EditlineTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<std::string> 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)); } |