Refactor constant declarations.
In preparation for default values for parcelable members.
Bug: 110758329
Test: boot Pixel 2
Test: runtests.sh
Change-Id: Id9c3f6b2242d66e69206c17cabfd61f8921d40b7
diff --git a/ast_java.h b/ast_java.h
index a525278..4b83465 100644
--- a/ast_java.h
+++ b/ast_java.h
@@ -350,10 +350,9 @@
struct IntConstant : public ClassElement {
const std::string name;
- const int value;
+ const std::string value;
- IntConstant(std::string name, int value)
- : name(name), value(value) {}
+ IntConstant(const std::string& name, const std::string& value) : name(name), value(value) {}
virtual ~IntConstant() = default;
void Write(CodeWriter* to) const override;