From 0f37c4fafa9de6def3bec0bad1aa27bc7a468765 Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 26 Oct 2023 22:28:44 +0800 Subject: [PATCH] styles: formatting --- include/json.hpp | 92 ++++++++++++------------------------------------ 1 file changed, 23 insertions(+), 69 deletions(-) diff --git a/include/json.hpp b/include/json.hpp index 09ed07b..333fb10 100644 --- a/include/json.hpp +++ b/include/json.hpp @@ -609,9 +609,7 @@ MEOJSON_INLINE basic_value::basic_value() = default; template MEOJSON_INLINE basic_value::basic_value(const basic_value& rhs) : _type(rhs._type), _raw_data(deep_copy(rhs._raw_data)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(basic_value&& rhs) noexcept = default; @@ -619,104 +617,74 @@ MEOJSON_INLINE basic_value::basic_value(basic_value&& rhs) n template MEOJSON_INLINE basic_value::basic_value(bool b) : _type(value_type::boolean), _raw_data(string_t(b ? true_string() : false_string())) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(int num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(unsigned num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(long num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(unsigned long num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(long long num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(unsigned long long num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(float num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(double num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(long double num) : _type(value_type::number), _raw_data(std::to_string(num)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(const char_t* str) : _type(value_type::string), _raw_data(string_t(str)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(string_t str) : _type(value_type::string), _raw_data(std::move(str)) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(basic_array arr) : _type(value_type::array), _raw_data(std::make_unique>(std::move(arr))) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value(basic_object obj) : _type(value_type::object), _raw_data(std::make_unique>(std::move(obj))) -{ - ; -} +{} template MEOJSON_INLINE basic_value::basic_value( std::initializer_list::value_type> init_list) : _type(value_type::object), _raw_data(std::make_unique>(init_list)) -{ - ; -} +{} // for Pimpl template @@ -1334,29 +1302,21 @@ MEOJSON_INLINE typename basic_value::var_t basic_value::deep template MEOJSON_INLINE basic_array::basic_array(std::initializer_list init_list) : _array_data(init_list) -{ - ; -} +{} template MEOJSON_INLINE basic_array::basic_array(typename raw_array::size_type size) : _array_data(size) -{ - ; -} +{} template MEOJSON_INLINE basic_array::basic_array(const basic_value& val) : basic_array(val.as_array()) -{ - ; -} +{} template MEOJSON_INLINE basic_array::basic_array(basic_value&& val) : basic_array(std::move(val.as_array())) -{ - ; -} +{} template MEOJSON_INLINE void basic_array::clear() noexcept @@ -1644,23 +1604,17 @@ MEOJSON_INLINE bool basic_array::operator==(const basic_array MEOJSON_INLINE basic_object::basic_object(std::initializer_list init_list) : _object_data(std::make_move_iterator(init_list.begin()), std::make_move_iterator(init_list.end())) -{ - ; -} +{} template MEOJSON_INLINE basic_object::basic_object(const basic_value& val) : basic_object(val.as_object()) -{ - ; -} +{} template MEOJSON_INLINE basic_object::basic_object(basic_value&& val) : basic_object(std::move(val.as_object())) -{ - ; -} +{} template MEOJSON_INLINE bool basic_object::contains(const string_t& key) const