Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
GyverLibs committed Jul 9, 2024
1 parent 406e625 commit facd716
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GSON
version=1.5.5
version=1.5.6
author=AlexGyver <alex@alexgyver.ru>
maintainer=AlexGyver <alex@alexgyver.ru>
sentence=Light JSON parsing and assembling library for Arduino
Expand Down
27 changes: 21 additions & 6 deletions src/utils/bson.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,27 @@

class BSON : private gtl::stack_uniq<uint8_t> {
public:
using gtl::stack_uniq<uint8_t>::reserve;
using gtl::stack_uniq<uint8_t>::length;
using gtl::stack_uniq<uint8_t>::buf;
using gtl::stack_uniq<uint8_t>::reserve;
using gtl::stack_uniq<uint8_t>::length;
using gtl::stack_uniq<uint8_t>::buf;
using gtl::stack_uniq<uint8_t>::clear;
using gtl::stack_uniq<uint8_t>::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();
Expand All @@ -50,9 +68,6 @@ class BSON : private gtl::stack_uniq<uint8_t> {
void add(const BSON& bson) {
concat(bson);
}
// void operator=(const BSON& bson) {
// concat(bson);
// }
void operator+=(const BSON& bson) {
concat(bson);
}
Expand Down

0 comments on commit facd716

Please sign in to comment.