diff options
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/archive.h | 2 | ||||
-rw-r--r-- | src/support/json.h | 8 | ||||
-rw-r--r-- | src/support/sorted_vector.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/support/archive.h b/src/support/archive.h index 95af1ac94..0ca066ff1 100644 --- a/src/support/archive.h +++ b/src/support/archive.h @@ -71,7 +71,7 @@ class Archive { Child child; bool error = false; // TODO: use std::error_code instead? public: - child_iterator() {} + child_iterator() = default; explicit child_iterator(bool error) : error(error) {} child_iterator(const Child& c) : child(c) {} const Child* operator->() const { return &child; } diff --git a/src/support/json.h b/src/support/json.h index 034cdc9b9..7ffa1211f 100644 --- a/src/support/json.h +++ b/src/support/json.h @@ -47,7 +47,7 @@ typedef cashew::IString IString; // Main value type struct Value { struct Ref : public std::shared_ptr<Value> { - Ref() : std::shared_ptr<Value>() {} + Ref() = default; Ref(Value* value) : std::shared_ptr<Value>(value) {} Ref& operator[](size_t x) { @@ -67,7 +67,7 @@ struct Value { Object = 5, }; - Type type; + Type type = Null; typedef std::vector<Ref> ArrayStorage; typedef std::unordered_map<IString, Ref> ObjectStorage; @@ -79,7 +79,7 @@ struct Value { #ifndef _MSC_VER IString str; #endif - double num; + double num = 0; ArrayStorage *arr; // manually allocated/freed bool boo; ObjectStorage *obj; // manually allocated/freed @@ -87,7 +87,7 @@ struct Value { }; // constructors all copy their input - Value() : type(Null), num(0) {} + Value() {} explicit Value(const char *s) : type(Null) { setString(s); } diff --git a/src/support/sorted_vector.h b/src/support/sorted_vector.h index 8f33de03a..da991ce78 100644 --- a/src/support/sorted_vector.h +++ b/src/support/sorted_vector.h @@ -26,7 +26,7 @@ namespace wasm { struct SortedVector : public std::vector<Index> { - SortedVector() {} + SortedVector() = default; SortedVector merge(const SortedVector& other) const { SortedVector ret; |