Skip to content

Commit 3eced7d

Browse files
committed
VariantImpl: rename getData() to data()
1 parent c4c5c69 commit 3eced7d

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/ArduinoJson/Array/JsonArray.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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_.getData(), impl_.getResourceManager());
68+
return addValue(value, impl_.data(), impl_.getResourceManager());
6969
}
7070

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

8181
// Returns an iterator to the first element of the array.
@@ -204,11 +204,11 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
204204
}
205205

206206
detail::VariantData* getData() const {
207-
return impl_.getData();
207+
return impl_.data();
208208
}
209209

210210
detail::VariantData* getOrCreateData() const {
211-
return impl_.getData();
211+
return impl_.data();
212212
}
213213

214214
// HACK: this function has been pulled out of VariantImpl to avoid the

src/ArduinoJson/Array/JsonArrayConst.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
6464
}
6565

6666
operator JsonVariantConst() const {
67-
return JsonVariantConst(impl_.getData(), impl_.getResourceManager());
67+
return JsonVariantConst(impl_.data(), impl_.getResourceManager());
6868
}
6969

7070
// Returns true if the reference is unbound.
@@ -99,7 +99,7 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {
9999

100100
private:
101101
const detail::VariantData* getData() const {
102-
return impl_.getData();
102+
return impl_.data();
103103
}
104104

105105
detail::VariantImpl impl_;

src/ArduinoJson/Object/JsonObject.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ class JsonObject : public detail::VariantOperators<JsonObject> {
226226
}
227227

228228
detail::VariantData* getData() const {
229-
return impl_.getData();
229+
return impl_.data();
230230
}
231231

232232
detail::VariantData* getOrCreateData() const {
233-
return impl_.getData();
233+
return impl_.data();
234234
}
235235

236236
mutable detail::VariantImpl impl_;

src/ArduinoJson/Object/JsonObjectConst.hpp

Lines changed: 2 additions & 2 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_.getData(), impl_.getResourceManager());
32+
return JsonVariantConst(impl_.data(), impl_.getResourceManager());
3333
}
3434

3535
// Returns true if the reference is unbound.
@@ -133,7 +133,7 @@ class JsonObjectConst : public detail::VariantOperators<JsonObjectConst> {
133133

134134
private:
135135
const detail::VariantData* getData() const {
136-
return impl_.getData();
136+
return impl_.data();
137137
}
138138

139139
detail::VariantImpl impl_;

src/ArduinoJson/Variant/JsonVariant.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class JsonVariant : public detail::VariantRefBase<JsonVariant>,
3131
}
3232

3333
detail::VariantData* getData() const {
34-
return impl_.getData();
34+
return impl_.data();
3535
}
3636

3737
detail::VariantData* getOrCreateData() const {
38-
return impl_.getData();
38+
return impl_.data();
3939
}
4040

4141
mutable detail::VariantImpl impl_;

src/ArduinoJson/Variant/JsonVariantConst.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class JsonVariantConst : public detail::VariantTag,
5050

5151
// Returns true if the reference is unbound.
5252
bool isUnbound() const {
53-
return impl_.getData() == nullptr;
53+
return impl_.data() == nullptr;
5454
}
5555

5656
// Returns the depth (nesting level) of the value.
@@ -177,7 +177,7 @@ class JsonVariantConst : public detail::VariantTag,
177177

178178
protected:
179179
detail::VariantData* getData() const {
180-
return impl_.getData();
180+
return impl_.data();
181181
}
182182

183183
detail::ResourceManager* getResourceManager() const {

src/ArduinoJson/Variant/VariantImpl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class VariantImpl {
2525
VariantImpl(VariantData* data, ResourceManager* resources)
2626
: data_(data), resources_(resources) {}
2727

28-
VariantData* getData() const {
28+
VariantData* data() const {
2929
return data_;
3030
}
3131

0 commit comments

Comments
 (0)