about summary refs log tree commit diff stats
path: root/034call.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 /034call.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 '034call.cc')
-rw-r--r--034call.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/034call.cc b/034call.cc
index 80d142d7..957a43f6 100644
--- a/034call.cc
+++ b/034call.cc
@@ -96,7 +96,7 @@ inline const instruction& to_instruction(const call& call) {
 
 :(after "Defined Recipe Checks")
 // not a primitive; check that it's present in the book of recipes
-if (Recipe.find(inst.operation) == Recipe.end()) {
+if (!contains_key(Recipe, inst.operation)) {
   raise_error << maybe(get(Recipe, r).name) << "undefined operation in '" << inst.to_string() << "'\n" << end();
   break;
 }