[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c594189 1/2: Modernize for statements
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c594189 1/2: Modernize for statements |
Date: |
Fri, 27 Jan 2017 12:12:54 +0000 (UTC) |
branch: master
commit c594189b9b35e01141bd5acf9da24b0360b1e064
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Modernize for statements
---
main_cgi.cpp | 12 +++++-------
system_command_wx.cpp | 4 ++--
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/main_cgi.cpp b/main_cgi.cpp
index f807fa8..8b9ccf3 100644
--- a/main_cgi.cpp
+++ b/main_cgi.cpp
@@ -457,13 +457,11 @@ ShowInput(cgicc::Cgicc const& data)
<< cgicc::td("Element Value") << cgicc::tr() << '\n';
// Iterate through the vector, and print out each value
- cgicc::const_form_iterator iter;
- for(iter = data.getElements().begin();
- iter != data.getElements().end();
- ++iter) {
- std::cout << cgicc::tr().set("class","data") << cgicc::td(iter->getName())
- << cgicc::td(iter->getValue()) << cgicc::tr() << '\n';
- }
+ for(auto const& j : data.getElements())
+ {
+ std::cout << cgicc::tr().set("class","data") << cgicc::td(j.getName())
+ << cgicc::td(j.getValue()) << cgicc::tr() << '\n';
+ }
std::cout << cgicc::table() << cgicc::div() << '\n';
}
diff --git a/system_command_wx.cpp b/system_command_wx.cpp
index 10aee32..264378d 100644
--- a/system_command_wx.cpp
+++ b/system_command_wx.cpp
@@ -51,9 +51,9 @@ void assemble_console_lines
}
os << category << '\n';
- for(std::size_t j = 0; j < lines.GetCount(); ++j)
+ for(auto const& j : lines)
{
- os << lines[j] << '\n';
+ os << j << '\n';
}
}