File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,8 @@ class JSON_API Value {
234
234
#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
235
235
236
236
public:
237
+ struct StaticInitTag {};
238
+ Value (StaticInitTag); // /< A special constructor for Value::null.
237
239
/* * \brief Create a default Value of the given type.
238
240
239
241
This is a very useful constructor.
@@ -249,8 +251,6 @@ Json::Value arr_value(Json::arrayValue); // []
249
251
Json::Value obj_value(Json::objectValue); // {}
250
252
\endcode
251
253
*/
252
- struct StaticInitTag {};
253
- Value (StaticInitTag);
254
254
Value (ValueType type = nullValue);
255
255
Value (Int value);
256
256
Value (UInt value);
Original file line number Diff line number Diff line change 23
23
24
24
namespace Json {
25
25
26
- // This is a walkaround to avoid the static initialization of Value::null.
27
- // kNull must be word-aligned to avoid crashing on ARM. We use an alignment of
28
- // 8 (instead of 4) as a bit of future-proofing.
29
- #if defined(__ARMEL__)
30
- #define ALIGNAS (byte_alignment ) __attribute__((aligned(byte_alignment)))
31
- #else
32
- // This exists for binary compatibility only. Use nullRef.
33
- const Value Value::null;
34
- #define ALIGNAS (byte_alignment )
35
- #endif
36
26
static const Value kNull ((Value::StaticInitTag ()));
37
27
const Value& Value::null = kNull ;
38
28
const Value& Value::nullRef = kNull ;
You can’t perform that action at this time.
0 commit comments