From 511d75962789837231459e53e86eaaa6a1ff6e06 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 19 Jun 2018 15:56:49 -0700 Subject: edify: Remove VAL_INVALID and move ValueType into Value class. Test: mmma -j bootable/recovery Test: Run recovery_component_test and recovery_unit_test on marlin. Change-Id: I4b240e3e771c387b9694be9c0f2f74e0265ab4cb --- edify/include/edify/expr.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'edify/include') diff --git a/edify/include/edify/expr.h b/edify/include/edify/expr.h index 770d1cf0d..ccd200778 100644 --- a/edify/include/edify/expr.h +++ b/edify/include/edify/expr.h @@ -53,19 +53,16 @@ struct State { bool is_retry = false; }; -enum ValueType { - VAL_INVALID = -1, - VAL_STRING = 1, - VAL_BLOB = 2, -}; - struct Value { - ValueType type; - std::string data; + enum class Type { + STRING = 1, + BLOB = 2, + }; + + Value(Type type, const std::string& str) : type(type), data(str) {} - Value(ValueType type, const std::string& str) : - type(type), - data(str) {} + Type type; + std::string data; }; struct Expr; -- cgit v1.2.3