diff options
author | lloyd <[email protected]> | 2013-04-12 15:35:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-04-12 15:35:24 +0000 |
commit | c32351f6fde6fc32f197cfc1f5af7e1f06916bfe (patch) | |
tree | 56929ef3e46d39a89e6b9100202a7b24d8d24f82 /checks | |
parent | 305b09b74e20e34880fc924de98fbc3a290cc80d (diff) |
Kill off old GCC 3.x workaround
Diffstat (limited to 'checks')
-rw-r--r-- | checks/bench.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp index 96afd7d87..ddb4ec8e2 100644 --- a/checks/bench.cpp +++ b/checks/bench.cpp @@ -119,8 +119,7 @@ void report_results(const std::string& algo, // invert, showing fastest impl first std::map<double, std::string> results; - for(std::map<std::string, double>::const_iterator i = speeds.begin(); - i != speeds.end(); ++i) + for(auto i = speeds.begin(); i != speeds.end(); ++i) { // Speeds might collide, tweak slightly to handle this if(results[i->second] == "") @@ -131,12 +130,7 @@ void report_results(const std::string& algo, std::cout << algo; -#if (defined(__GNUC__) && __GNUC__ <= 3) || defined(__SUNPRO_CC) - // Work around GCC 3.x bug, reverse iterators don't work - for(std::map<double, std::string>::const_iterator i = results.begin(); i != results.end(); ++i) -#else - for(std::map<double, std::string>::const_reverse_iterator i = results.rbegin(); i != results.rend(); ++i) -#endif + for(auto i = results.rbegin(); i != results.rend(); ++i) { std::cout << " [" << i->second << "] " << std::fixed << std::setprecision(2) << i->first; |