about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-16 23:17:42 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-16 23:17:42 -0700
commit304963834dbe1e9f019a818e0dbf9c63647fa1c4 (patch)
tree6a8ef654b42a73afbfb8bf9dcfab0bb5fd60a3b3
parent65ccad4c6e50ea4298f8e661a8cf79174e970d73 (diff)
downloadmu-304963834dbe1e9f019a818e0dbf9c63647fa1c4.tar.gz
1389
-rw-r--r--002test.cc2
-rw-r--r--041name.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/002test.cc b/002test.cc
index 99ef38b1..81bcba6d 100644
--- a/002test.cc
+++ b/002test.cc
@@ -81,7 +81,7 @@ void run_test(index_t i) {
 }
 
 bool is_integer(const string& s) {
-  return s.find_first_not_of("0123456789-") == string::npos;
+  return s.find_first_not_of("0123456789-") == NOT_FOUND;
 }
 
 long long int to_integer(string n) {
diff --git a/041name.cc b/041name.cc
index 4e381f31..1f8a17bd 100644
--- a/041name.cc
+++ b/041name.cc
@@ -217,7 +217,7 @@ if (inst.operation == Recipe_number["get"]
   assert(inst.ingredients.size() >= 2);
 //?   cout << inst.ingredients.at(1).to_string() << '\n'; //? 1
   assert(isa_literal(inst.ingredients.at(1)));
-  if (inst.ingredients.at(1).name.find_first_not_of("0123456789") == string::npos) continue;
+  if (inst.ingredients.at(1).name.find_first_not_of("0123456789") == NOT_FOUND) continue;
   // since first non-address in base type must be a container, we don't have to canonize
   type_number base_type = skip_addresses(inst.ingredients.at(0).types);
   inst.ingredients.at(1).set_value(find_element_name(base_type, inst.ingredients.at(1).name));
@@ -253,7 +253,7 @@ if (inst.operation == Recipe_number["maybe-convert"]) {
   // at least 2 args, and second arg is offset
   assert(inst.ingredients.size() >= 2);
   assert(isa_literal(inst.ingredients.at(1)));
-  if (inst.ingredients.at(1).name.find_first_not_of("0123456789") == string::npos) continue;
+  if (inst.ingredients.at(1).name.find_first_not_of("0123456789") == NOT_FOUND) continue;
   // since first non-address in base type must be an exclusive container, we don't have to canonize
   type_number base_type = skip_addresses(inst.ingredients.at(0).types);
   inst.ingredients.at(1).set_value(find_element_name(base_type, inst.ingredients.at(1).name));