From d8d514fa33a2f2f9504732a19fdba81a6ccccbd7 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 9 Jul 2018 13:32:28 -0700 Subject: edify: Rename parse_string to ParseString and let it take std::string. Also simplify the helper function expect() in {edify,updater}_test.cpp. Test: Run recovery_component_test on marlin. Change-Id: If54febba4b5013f6d71546318a1ca6b635204ac8 --- edify/parser.yy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'edify/parser.yy') diff --git a/edify/parser.yy b/edify/parser.yy index bd2e0105f..3a63c37f8 100644 --- a/edify/parser.yy +++ b/edify/parser.yy @@ -138,7 +138,7 @@ void yyerror(std::unique_ptr* root, int* error_count, const char* s) { ++*error_count; } -int parse_string(const char* str, std::unique_ptr* root, int* error_count) { - yy_switch_to_buffer(yy_scan_string(str)); - return yyparse(root, error_count); +int ParseString(const std::string& str, std::unique_ptr* root, int* error_count) { + yy_switch_to_buffer(yy_scan_string(str.c_str())); + return yyparse(root, error_count); } -- cgit v1.2.3