Skip to content

Commit ce85e67

Browse files
hchunhuicdunn2001
authored andcommitted
clean
1 parent 7f0399d commit ce85e67

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

include/json/value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ class JSON_API Value {
234234
#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
235235

236236
public:
237+
struct StaticInitTag {};
238+
Value(StaticInitTag); ///< A special constructor for Value::null.
237239
/** \brief Create a default Value of the given type.
238240
239241
This is a very useful constructor.
@@ -249,8 +251,6 @@ Json::Value arr_value(Json::arrayValue); // []
249251
Json::Value obj_value(Json::objectValue); // {}
250252
\endcode
251253
*/
252-
struct StaticInitTag {};
253-
Value(StaticInitTag);
254254
Value(ValueType type = nullValue);
255255
Value(Int value);
256256
Value(UInt value);

src/lib_json/json_value.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@
2323

2424
namespace Json {
2525

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
3626
static const Value kNull((Value::StaticInitTag()));
3727
const Value& Value::null = kNull;
3828
const Value& Value::nullRef = kNull;

0 commit comments

Comments
 (0)