From facd71675961bff49b30618f43e6fe6ebb0aea2c Mon Sep 17 00:00:00 2001 From: AlexGyver Date: Tue, 9 Jul 2024 11:04:53 +0300 Subject: [PATCH] upd --- library.properties | 2 +- src/utils/bson.h | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/library.properties b/library.properties index e9698ce..f6332f5 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=GSON -version=1.5.5 +version=1.5.6 author=AlexGyver maintainer=AlexGyver sentence=Light JSON parsing and assembling library for Arduino diff --git a/src/utils/bson.h b/src/utils/bson.h index 7181804..54b8e85 100644 --- a/src/utils/bson.h +++ b/src/utils/bson.h @@ -34,9 +34,27 @@ class BSON : private gtl::stack_uniq { public: - using gtl::stack_uniq::reserve; - using gtl::stack_uniq::length; - using gtl::stack_uniq::buf; + using gtl::stack_uniq::reserve; + using gtl::stack_uniq::length; + using gtl::stack_uniq::buf; + using gtl::stack_uniq::clear; + using gtl::stack_uniq::move; + + BSON() {} + BSON(BSON& b) { + move(b); + } + BSON(BSON&& b) { + move(b); + } + BSON& operator=(BSON& b) { + move(b); + return *this; + } + BSON& operator=(BSON&& b) { + move(b); + return *this; + } operator Text() { return toText(); @@ -50,9 +68,6 @@ class BSON : private gtl::stack_uniq { void add(const BSON& bson) { concat(bson); } - // void operator=(const BSON& bson) { - // concat(bson); - // } void operator+=(const BSON& bson) { concat(bson); }