aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-10-05 14:06:49 -0500
committerTao Bao2017-10-05 14:46:18 -0500
commit0bf20d51336aef08850d0152a6e1501f4b733cf6 (patch)
tree457ff3c86c54dc30219977faeb23fa42022d1a5e /edify/expr.cpp
parent9baa19012a535fa158d00fe37f19b1fbae5381cf (diff)
downloadplatform-bootable-recovery-0bf20d51336aef08850d0152a6e1501f4b733cf6.tar.gz
platform-bootable-recovery-0bf20d51336aef08850d0152a6e1501f4b733cf6.tar.xz
platform-bootable-recovery-0bf20d51336aef08850d0152a6e1501f4b733cf6.zip
Don't include "error_code.h" in edify/expr.h.
Use forward declartion to avoid pull in the module that contains error_code.h (trying to move it into libotautil). Otherwise all the modules that include "edify/expr.h" need to depend on the module that exports error_code.h. .cpp sources should include "error_code.h" explicitly to use the enums. Test: lunch aosp_{angler,bullhead,dragon,fugu,sailfish}-userdebug; mmma bootable/recovery Change-Id: Ic82db2746c7deb866e8cdfb3c57e0b1ecc71c4dc
Diffstat (limited to 'edify/expr.cpp')
-rw-r--r--edify/expr.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/edify/expr.cpp b/edify/expr.cpp
index 54ab3325..403162d6 100644
--- a/edify/expr.cpp
+++ b/edify/expr.cpp
@@ -31,6 +31,8 @@
31#include <android-base/stringprintf.h> 31#include <android-base/stringprintf.h>
32#include <android-base/strings.h> 32#include <android-base/strings.h>
33 33
34#include "error_code.h"
35
34// Functions should: 36// Functions should:
35// 37//
36// - return a malloc()'d string 38// - return a malloc()'d string
@@ -416,8 +418,5 @@ Value* ErrorAbort(State* state, CauseCode cause_code, const char* format, ...) {
416 return nullptr; 418 return nullptr;
417} 419}
418 420
419State::State(const std::string& script, void* cookie) : 421State::State(const std::string& script, void* cookie)
420 script(script), 422 : script(script), cookie(cookie), error_code(kNoError), cause_code(kNoCause) {}
421 cookie(cookie) {
422}
423