From f48f6c143583d809984d8f3b902a99c00ba8a4a4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 26 Mar 2015 20:50:56 -0700 Subject: 980 --- cpp/010vm | 7 ++----- cpp/013run | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'cpp') diff --git a/cpp/010vm b/cpp/010vm index 1d45f157..1a33fe50 100644 --- a/cpp/010vm +++ b/cpp/010vm @@ -82,13 +82,10 @@ void setup_types() { Next_type_number = 1; // Mu Types Initialization. int integer = Type_number["integer"] = Next_type_number++; - Type[integer].size = 1; Type[integer].name = "integer"; int address = Type_number["address"] = Next_type_number++; - Type[address].size = 1; Type[address].name = "address"; int boolean = Type_number["boolean"] = Next_type_number++; - Type[boolean].size = 1; Type[boolean].name = "boolean"; // End Mu Types Initialization. } @@ -104,14 +101,14 @@ void setup_types() { // high scores in a game might need an array of numbers. struct type_info { string name; - size_t size; bool is_record; bool is_array; + size_t size; // only if is_record vector > elements; // only if is_record vector element_names; // only if is_record vector element; // only if is_array // End type_info Fields. - type_info() :size(0), is_record(false), is_array(false) {} + type_info() :is_record(false), is_array(false), size(0) {} }; :(before "End Globals") diff --git a/cpp/013run b/cpp/013run index 9790bfdd..8456a7c0 100644 --- a/cpp/013run +++ b/cpp/013run @@ -152,7 +152,7 @@ size_t size_of(const reagent& r) { size_t size_of(const vector& types) { type_info t = Type[types[0]]; // End size_of Cases. - return t.size; + return 1; } bool is_dummy(const reagent& x) { -- cgit 1.4.1-2-gfad0