Skip to content

Commit

Permalink
Remove final from JsonArray, JsonObject, and JsonVariant
Browse files Browse the repository at this point in the history
  • Loading branch information
bblanchon committed Feb 18, 2024
1 parent 483a2c9 commit 04ac53d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 20 deletions.
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
ArduinoJson: change log
=======================

HEAD
----

* Mark `JsonArray`, `JsonObject`, and `JsonVariant` as `final` (issue #2056)

v7.0.3 (2024-02-05)
------

Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoJson/Array/JsonArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JsonObject;

// A reference to an array in a JsonDocument
// https://arduinojson.org/v7/api/jsonarray/
class JsonArray final : public detail::VariantOperators<JsonArray> {
class JsonArray : public detail::VariantOperators<JsonArray> {
friend class detail::VariantAttorney;

public:
Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoJson/Array/JsonArrayConst.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JsonObject;

// A read-only reference to an array in a JsonDocument
// https://arduinojson.org/v7/api/jsonarrayconst/
class JsonArrayConst final : public detail::VariantOperators<JsonArrayConst> {
class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
friend class JsonArray;
friend class detail::VariantAttorney;

Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoJson/Array/JsonArrayIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Ptr {
T value_;
};

class JsonArrayIterator final {
class JsonArrayIterator {
friend class JsonArray;

public:
Expand Down Expand Up @@ -59,7 +59,7 @@ class JsonArrayIterator final {
detail::ResourceManager* resources_;
};

class JsonArrayConstIterator final {
class JsonArrayConstIterator {
friend class JsonArray;

public:
Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoJson/Object/JsonObject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JsonArray;

// A reference to an object in a JsonDocument.
// https://arduinojson.org/v7/api/jsonobject/
class JsonObject final : public detail::VariantOperators<JsonObject> {
class JsonObject : public detail::VariantOperators<JsonObject> {
friend class detail::VariantAttorney;

public:
Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoJson/Object/JsonObjectConst.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE

// A read-only reference to an object in a JsonDocument.
// https://arduinojson.org/v7/api/jsonobjectconst/
class JsonObjectConst final : public detail::VariantOperators<JsonObjectConst> {
class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
friend class JsonObject;
friend class detail::VariantAttorney;

Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoJson/Object/JsonObjectIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE

class JsonObjectIterator final {
class JsonObjectIterator {
friend class JsonObject;

public:
Expand Down Expand Up @@ -43,7 +43,7 @@ class JsonObjectIterator final {
detail::ResourceManager* resources_;
};

class JsonObjectConstIterator final {
class JsonObjectConstIterator {
friend class JsonObject;

public:
Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoJson/Object/JsonPair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE

// A key-value pair.
// https://arduinojson.org/v7/api/jsonobject/begin_end/
class JsonPair final {
class JsonPair {
public:
// INTERNAL USE ONLY
JsonPair(detail::ObjectData::iterator iterator,
Expand Down Expand Up @@ -41,7 +41,7 @@ class JsonPair final {

// A read-only key-value pair.
// https://arduinojson.org/v7/api/jsonobjectconst/begin_end/
class JsonPairConst final {
class JsonPairConst {
public:
JsonPairConst(detail::ObjectData::iterator iterator,
const detail::ResourceManager* resources)
Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoJson/Variant/JsonVariant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE

// A reference to a value in a JsonDocument.
// https://arduinojson.org/v7/api/jsonvariant/
class JsonVariant final : public detail::VariantRefBase<JsonVariant>,
public detail::VariantOperators<JsonVariant> {
class JsonVariant : public detail::VariantRefBase<JsonVariant>,
public detail::VariantOperators<JsonVariant> {
friend class detail::VariantAttorney;

public:
Expand Down
5 changes: 2 additions & 3 deletions src/ArduinoJson/Variant/JsonVariantConst.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class JsonObject;

// A read-only reference to a value in a JsonDocument
// https://arduinojson.org/v7/api/jsonarrayconst/
class JsonVariantConst final
: public detail::VariantTag,
public detail::VariantOperators<JsonVariantConst> {
class JsonVariantConst : public detail::VariantTag,
public detail::VariantOperators<JsonVariantConst> {
friend class detail::VariantAttorney;

public:
Expand Down

0 comments on commit 04ac53d

Please sign in to comment.