about summary refs log tree commit diff stats
path: root/055shape_shifting_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-11 18:07:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-11 18:17:46 -0700
commit555d95c1684c39937d0950b482413674618d92a3 (patch)
tree72c35cf68a51e2bc03914d4365a8dbe27a59caff /055shape_shifting_container.cc
parentf7f40d32b023751bb34c3a5508b48edfb4eae18a (diff)
downloadmu-555d95c1684c39937d0950b482413674618d92a3.tar.gz
3327
Diffstat (limited to '055shape_shifting_container.cc')
-rw-r--r--055shape_shifting_container.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 596c691e..ef165c91 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -162,7 +162,7 @@ bool slurp_type_ingredients(istream& in, map<string, type_ordinal>& out, const s
       raise << container_name << ": empty type ingredients not permitted\n" << end();
       return false;
     }
-    if (curr.at(0) != '_') {
+    if (!starts_with(curr, "_")) {
       raise << container_name << ": type ingredient '" << curr << "' must begin with an underscore\n" << end();
       return false;
     }
@@ -191,7 +191,7 @@ else if (is_type_ingredient_name(type->name)) {
 }
 :(code)
 bool is_type_ingredient_name(const string& type) {
-  return !type.empty() && type.at(0) == '_';
+  return starts_with(type, "_");
 }
 
 :(before "End Container Type Checks")