about summary refs log tree commit diff stats
path: root/cpp/002test.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/002test.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/002test.cc')
-rw-r--r--cpp/002test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/002test.cc b/cpp/002test.cc
index 3daa1aed..af56ae97 100644
--- a/cpp/002test.cc
+++ b/cpp/002test.cc
@@ -53,7 +53,7 @@ if (Run_tests) {
   // End Test Run Initialization
   time_t t; time(&t);
   cerr << "C tests: " << ctime(&t);
-  for (size_t i=0; i < sizeof(Tests)/sizeof(Tests[0]); ++i) {
+  for (index_t i=0; i < sizeof(Tests)/sizeof(Tests[0]); ++i) {
     run_test(i);
   }
   // End Tests
@@ -66,7 +66,7 @@ if (Run_tests) {
 }
 
 :(code)
-void run_test(size_t i) {
+void run_test(index_t i) {
   if (i >= sizeof(Tests)/sizeof(Tests[0])) {
     cerr << "no test " << i << '\n';
     return;