about summary refs log tree commit diff stats
path: root/011load.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-06 13:22:16 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-06 13:22:30 -0800
commitf3760b0f2828250b4b5fb1a52601fe6b11ff328f (patch)
tree69ec57c652ff823e92146281ba656e3eaba57eb7 /011load.cc
parent12f304a333ecee6326a8111e0d8e1c494ee92087 (diff)
downloadmu-f3760b0f2828250b4b5fb1a52601fe6b11ff328f.tar.gz
2379 - further improvements to map operations
Commands run:

  $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) != [^.]*\.end()/contains_key(\1, \2)/g' 0[^0]*cc
  $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) == [^.]*\.end()/!contains_key(\1, \2)/g' 0[^0]*cc
Diffstat (limited to '011load.cc')
-rw-r--r--011load.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/011load.cc b/011load.cc
index 2c5806e8..51d2e8e7 100644
--- a/011load.cc
+++ b/011load.cc
@@ -47,7 +47,7 @@ long long int slurp_recipe(istream& in) {
   if (result.name.empty())
     raise_error << "empty result.name\n" << end();
   trace(9991, "parse") << "--- defining " << result.name << end();
-  if (Recipe_ordinal.find(result.name) == Recipe_ordinal.end()) {
+  if (!contains_key(Recipe_ordinal, result.name)) {
     put(Recipe_ordinal, result.name, Next_recipe_ordinal++);
   }
   if (Recipe.find(get(Recipe_ordinal, result.name)) != Recipe.end()) {