commit | 1d878f3e1c39162496d7c061f7f6710e414d182b | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Wed Apr 11 15:17:54 2012 -0700 |
committer | Elliott Hughes <enh@google.com> | Wed Apr 11 15:17:54 2012 -0700 |
tree | 203a26165bff88dd352580c088c0775b953d363a | |
parent | 4b952e74b4b2efa15cecedfc643c212eaeac2cc7 [diff] [blame] |
Add a default constructor to JValue. Change-Id: I7abe801b26f5003c480215c1f1ca64dfc07667ed
diff --git a/src/object.h b/src/object.h index 3ece535..7413bf9 100644 --- a/src/object.h +++ b/src/object.h
@@ -60,6 +60,9 @@ typedef PrimitiveArray<int16_t> ShortArray; union JValue { + // We default initialize JValue instances to all-zeros. + JValue() : j(0) {} + uint8_t z; int8_t b; uint16_t c;