From 05d177737c980aad2fcdb54765433e02021ab1e0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 7 May 2015 15:49:40 -0700 Subject: 1299 - stop using [] in any vector Useful check: $ grep "[^ '\"]\[[^\"]" *.cc \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |grep '[^ ]\[' --- 045closure_name.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '045closure_name.cc') diff --git a/045closure_name.cc b/045closure_name.cc index 6273e880..83fbeede 100644 --- a/045closure_name.cc +++ b/045closure_name.cc @@ -43,7 +43,7 @@ map Surrounding_space; :(code) void collect_surrounding_spaces(const recipe_number r) { for (index_t i = 0; i < Recipe[r].steps.size(); ++i) { - const instruction& inst = Recipe[r].steps[i]; + const instruction& inst = Recipe[r].steps.at(i); if (inst.is_label) continue; for (index_t j = 0; j < inst.products.size(); ++j) { if (isa_literal(inst.products.at(j))) continue; -- cgit 1.4.1-2-gfad0