about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-21 09:17:35 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-21 09:17:35 -0700
commit2d29369f92eeecf2189ddeff3c7bd3260e1ab130 (patch)
treef68b479026364dd607856bb35b4ecba3ceebd19c
parent4955b30b7f17b15d45d7df14b7e538bd08ac3d04 (diff)
downloadmu-2d29369f92eeecf2189ddeff3c7bd3260e1ab130.tar.gz
3541
-rw-r--r--027call_ingredient.cc4
-rw-r--r--053recipe_header.cc4
2 files changed, 2 insertions, 6 deletions
diff --git a/027call_ingredient.cc b/027call_ingredient.cc
index 50348093..9ead185b 100644
--- a/027call_ingredient.cc
+++ b/027call_ingredient.cc
@@ -77,9 +77,7 @@ case NEXT_INGREDIENT: {
     if (current_instruction().products.empty()) break;
     products.resize(2);
     // pad the first product with sufficient zeros to match its type
-    int size = size_of(current_instruction().products.at(0));
-    for (int i = 0;  i < size;  ++i)
-      products.at(0).push_back(0);
+    products.at(0).resize(size_of(current_instruction().products.at(0)));
     products.at(1).push_back(0);
   }
   break;
diff --git a/053recipe_header.cc b/053recipe_header.cc
index 450a0142..a98b4c54 100644
--- a/053recipe_header.cc
+++ b/053recipe_header.cc
@@ -214,9 +214,7 @@ case NEXT_INGREDIENT_WITHOUT_TYPECHECKING: {
   else {
     products.resize(2);
     // pad the first product with sufficient zeros to match its type
-    int size = size_of(current_instruction().products.at(0));
-    for (int i = 0;  i < size;  ++i)
-      products.at(0).push_back(0);
+    products.at(0).resize(size_of(current_instruction().products.at(0)));
     products.at(1).push_back(0);
   }
   break;