Skip to content

Commit af36add

Browse files
committed
VariantImpl: rename getResourceManager() to resources()
1 parent 3eced7d commit af36add

File tree

7 files changed

+20
-22
lines changed

7 files changed

+20
-22
lines changed

src/ArduinoJson/Array/JsonArray.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
5656
template <typename T, detail::enable_if_t<
5757
detail::is_same<T, JsonVariant>::value, int> = 0>
5858
JsonVariant add() const {
59-
return JsonVariant(impl_.addNewElement(), impl_.getResourceManager());
59+
return JsonVariant(impl_.addNewElement(), impl_.resources());
6060
}
6161

6262
// Appends a value to the array.
@@ -65,7 +65,7 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
6565
bool add(const T& value) const {
6666
if (!impl_.isArray())
6767
return false;
68-
return addValue(value, impl_.data(), impl_.getResourceManager());
68+
return addValue(value, impl_.data(), impl_.resources());
6969
}
7070

7171
// Appends a value to the array.
@@ -75,13 +75,13 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
7575
bool add(T* value) const {
7676
if (!impl_.isArray())
7777
return false;
78-
return addValue(value, impl_.data(), impl_.getResourceManager());
78+
return addValue(value, impl_.data(), impl_.resources());
7979
}
8080

8181
// Returns an iterator to the first element of the array.
8282
// https://arduinojson.org/v7/api/jsonarray/begin/
8383
iterator begin() const {
84-
return iterator(impl_.createIterator(), impl_.getResourceManager());
84+
return iterator(impl_.createIterator(), impl_.resources());
8585
}
8686

8787
// Returns an iterator following the last element of the array.
@@ -200,7 +200,7 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
200200

201201
private:
202202
detail::ResourceManager* getResourceManager() const {
203-
return impl_.getResourceManager();
203+
return impl_.resources();
204204
}
205205

206206
detail::VariantData* getData() const {

src/ArduinoJson/Array/JsonArrayConst.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
2424
// Returns an iterator to the first element of the array.
2525
// https://arduinojson.org/v7/api/jsonarrayconst/begin/
2626
iterator begin() const {
27-
return iterator(impl_.createIterator(), impl_.getResourceManager());
27+
return iterator(impl_.createIterator(), impl_.resources());
2828
}
2929

3030
// Returns an iterator to the element following the last element of the array.
@@ -48,8 +48,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
4848
template <typename T,
4949
detail::enable_if_t<detail::is_integral<T>::value, int> = 0>
5050
JsonVariantConst operator[](T index) const {
51-
return JsonVariantConst(impl_.getElement(size_t(index)),
52-
impl_.getResourceManager());
51+
return JsonVariantConst(impl_.getElement(size_t(index)), impl_.resources());
5352
}
5453

5554
// Returns the element at the specified index.
@@ -64,7 +63,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
6463
}
6564

6665
operator JsonVariantConst() const {
67-
return JsonVariantConst(impl_.data(), impl_.getResourceManager());
66+
return JsonVariantConst(impl_.data(), impl_.resources());
6867
}
6968

7069
// Returns true if the reference is unbound.

src/ArduinoJson/Object/JsonObject.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class JsonObject : public detail::VariantOperators<JsonObject> {
6868
// Returns an iterator to the first key-value pair of the object.
6969
// https://arduinojson.org/v7/api/jsonobject/begin/
7070
iterator begin() const {
71-
return iterator(impl_.createIterator(), impl_.getResourceManager());
71+
return iterator(impl_.createIterator(), impl_.resources());
7272
}
7373

7474
// Returns an iterator following the last key-value pair of the object.
@@ -222,7 +222,7 @@ class JsonObject : public detail::VariantOperators<JsonObject> {
222222

223223
private:
224224
detail::ResourceManager* getResourceManager() const {
225-
return impl_.getResourceManager();
225+
return impl_.resources();
226226
}
227227

228228
detail::VariantData* getData() const {

src/ArduinoJson/Object/JsonObjectConst.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
2929
JsonObjectConst(const detail::VariantImpl& impl) : impl_(impl) {}
3030

3131
operator JsonVariantConst() const {
32-
return JsonVariantConst(impl_.data(), impl_.getResourceManager());
32+
return JsonVariantConst(impl_.data(), impl_.resources());
3333
}
3434

3535
// Returns true if the reference is unbound.
@@ -59,7 +59,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
5959
// Returns an iterator to the first key-value pair of the object.
6060
// https://arduinojson.org/v7/api/jsonobjectconst/begin/
6161
iterator begin() const {
62-
return iterator(impl_.createIterator(), impl_.getResourceManager());
62+
return iterator(impl_.createIterator(), impl_.resources());
6363
}
6464

6565
// Returns an iterator following the last key-value pair of the object.
@@ -100,7 +100,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
100100
detail::enable_if_t<detail::IsString<TString>::value, int> = 0>
101101
JsonVariantConst operator[](const TString& key) const {
102102
return JsonVariantConst(impl_.getMember(detail::adaptString(key)),
103-
impl_.getResourceManager());
103+
impl_.resources());
104104
}
105105

106106
// Gets the member with specified key.
@@ -111,7 +111,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
111111
int> = 0>
112112
JsonVariantConst operator[](TChar* key) const {
113113
return JsonVariantConst(impl_.getMember(detail::adaptString(key)),
114-
impl_.getResourceManager());
114+
impl_.resources());
115115
}
116116

117117
// Gets the member with specified key.

src/ArduinoJson/Variant/JsonVariant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class JsonVariant : public detail::VariantRefBase<JsonVariant>,
2727

2828
private:
2929
detail::ResourceManager* getResourceManager() const {
30-
return impl_.getResourceManager();
30+
return impl_.resources();
3131
}
3232

3333
detail::VariantData* getData() const {

src/ArduinoJson/Variant/JsonVariantConst.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ class JsonVariantConst : public detail::VariantTag,
104104
template <typename T,
105105
detail::enable_if_t<detail::is_integral<T>::value, int> = 0>
106106
JsonVariantConst operator[](T index) const {
107-
return JsonVariantConst(impl_.getElement(size_t(index)),
108-
impl_.getResourceManager());
107+
return JsonVariantConst(impl_.getElement(size_t(index)), impl_.resources());
109108
}
110109

111110
// Gets object's member with specified key.
@@ -114,7 +113,7 @@ class JsonVariantConst : public detail::VariantTag,
114113
detail::enable_if_t<detail::IsString<TString>::value, int> = 0>
115114
JsonVariantConst operator[](const TString& key) const {
116115
return JsonVariantConst(impl_.getMember(detail::adaptString(key)),
117-
impl_.getResourceManager());
116+
impl_.resources());
118117
}
119118

120119
// Gets object's member with specified key.
@@ -125,7 +124,7 @@ class JsonVariantConst : public detail::VariantTag,
125124
int> = 0>
126125
JsonVariantConst operator[](TChar* key) const {
127126
return JsonVariantConst(impl_.getMember(detail::adaptString(key)),
128-
impl_.getResourceManager());
127+
impl_.resources());
129128
}
130129

131130
// Gets object's member with specified key or the array's element at the
@@ -181,7 +180,7 @@ class JsonVariantConst : public detail::VariantTag,
181180
}
182181

183182
detail::ResourceManager* getResourceManager() const {
184-
return impl_.getResourceManager();
183+
return impl_.resources();
185184
}
186185

187186
private:

src/ArduinoJson/Variant/VariantImpl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class VariantImpl {
2929
return data_;
3030
}
3131

32-
ResourceManager* getResourceManager() const {
32+
ResourceManager* resources() const {
3333
return resources_;
3434
}
3535

0 commit comments

Comments
 (0)