C++11: Cleaned up program framework with range-based for

This commit is contained in:
Paul Beckingham
2015-05-11 17:50:53 -04:00
parent 5a57dfd70d
commit e74c6963a9
28 changed files with 937 additions and 1221 deletions

View File

@@ -80,10 +80,9 @@ static bool sort_compare (int left, int right)
float left_real;
float right_real;
std::vector <std::string>::iterator k;
for (k = global_keys.begin (); k != global_keys.end (); ++k)
for (auto& k : global_keys)
{
context.decomposeSortField (*k, field, ascending, breakIndicator);
context.decomposeSortField (k, field, ascending, breakIndicator);
// Urgency.
if (field == "urgency")