aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-04-12 15:35:24 +0000
committerlloyd <[email protected]>2013-04-12 15:35:24 +0000
commitc32351f6fde6fc32f197cfc1f5af7e1f06916bfe (patch)
tree56929ef3e46d39a89e6b9100202a7b24d8d24f82
parent305b09b74e20e34880fc924de98fbc3a290cc80d (diff)
Kill off old GCC 3.x workaround
-rw-r--r--checks/bench.cpp10
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;