about summary refs log tree commit diff stats
path: root/085scenario_console.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-26 13:40:19 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-26 13:40:19 -0700
commit7fd010710c0a34ff103bec3fb271f0c207bfcc53 (patch)
tree710cec51fc102241ec540511a72a6ee4c52d3e87 /085scenario_console.cc
parent029a3bdf53b523eded91a30177affdcace3bb2a1 (diff)
downloadmu-7fd010710c0a34ff103bec3fb271f0c207bfcc53.tar.gz
3259
Prefer preincrement operators wherever possible. Old versions of
compilers used to be better at optimizing them. Even if we don't care
about performance it's useful to make unary operators look like unary
operators wherever possible, and to distinguish the 'statement form'
which doesn't care about the value of the expression from the
postincrement which usually increments as a side-effect in some larger
computation (and so is worth avoiding except for some common idioms, or
perhaps even there).
Diffstat (limited to '085scenario_console.cc')
-rw-r--r--085scenario_console.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/085scenario_console.cc b/085scenario_console.cc
index fc0e21cc..d18792af 100644
--- a/085scenario_console.cc
+++ b/085scenario_console.cc
@@ -273,7 +273,7 @@ int count_events(const recipe& r) {
     if (curr.name == "type")
       result += unicode_length(curr.ingredients.at(0).name);
     else
-      result++;
+      ++result;
   }
   return result;
 }