Skip to content

Commit debda15

Browse files
committed
Add nullptr Json::Value constructor
1 parent 632044a commit debda15

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

include/json/value.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ class JSON_API Value {
342342
Value(const StaticString& value);
343343
Value(const String& value);
344344
Value(bool value);
345+
Value(nullptr_t ptr);
345346
Value(const Value& other);
346347
Value(Value&& other);
347348
~Value();

src/lib_json/json_value.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ Value::Value(bool value) {
428428
value_.bool_ = value;
429429
}
430430

431+
Value::Value(nullptr_t value) { initBasic(nullValue); }
432+
431433
Value::Value(const Value& other) {
432434
dupPayload(other);
433435
dupMeta(other);

0 commit comments

Comments
 (0)