about summary refs log tree commit diff stats
path: root/cpp/031address.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-04 11:02:56 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-04 11:02:56 -0700
commita66c9ae68122e04637d65c7f3aedcd96012c8cb6 (patch)
treeceddf9f22c55621be86768a0aeedc927495e62d6 /cpp/031address.cc
parentde49fb426aa44984d308f5856ec836360ba0bdce (diff)
downloadmu-a66c9ae68122e04637d65c7f3aedcd96012c8cb6.tar.gz
1249 - new type: index_t
It will always be identical to size_t, just more readable, like
recipe_number, etc. The various unsigned types are sizes, indices (which
often compare with sizes for bounds checking), numbers which are
canonical elements of a specific space (like recipes or mu types), and
ids which I haven't introduced yet.
Diffstat (limited to 'cpp/031address.cc')
-rw-r--r--cpp/031address.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/031address.cc b/cpp/031address.cc
index fd9037b1..f84af8d7 100644
--- a/cpp/031address.cc
+++ b/cpp/031address.cc
@@ -115,14 +115,14 @@ base = canonize(base);
 
 :(code)
 bool has_property(reagent x, string name) {
-  for (size_t i = 0; i < x.properties.size(); ++i) {
+  for (index_t i = 0; i < x.properties.size(); ++i) {
     if (x.properties[i].first == name) return true;
   }
   return false;
 }
 
 vector<string> property(const reagent& r, const string& name) {
-  for (size_t p = 0; p != r.properties.size(); ++p) {
+  for (index_t p = 0; p != r.properties.size(); ++p) {
     if (r.properties[p].first == name)
       return r.properties[p].second;
   }