forked from bblanchon/ArduinoJson
Mark adapter's storagePolicy()
as const
This commit is contained in:
@ -61,7 +61,7 @@ class FlashString {
|
|||||||
::memcpy_P(p, s._str, n);
|
::memcpy_P(p, s._str, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringStoragePolicy::Copy storagePolicy() {
|
StringStoragePolicy::Copy storagePolicy() const {
|
||||||
return StringStoragePolicy::Copy();
|
return StringStoragePolicy::Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class JsonStringAdapter : public SizedRamString {
|
|||||||
JsonStringAdapter(const JsonString& s)
|
JsonStringAdapter(const JsonString& s)
|
||||||
: SizedRamString(s.c_str(), s.size()), _linked(s.isLinked()) {}
|
: SizedRamString(s.c_str(), s.size()), _linked(s.isLinked()) {}
|
||||||
|
|
||||||
StringStoragePolicy::LinkOrCopy storagePolicy() {
|
StringStoragePolicy::LinkOrCopy storagePolicy() const {
|
||||||
StringStoragePolicy::LinkOrCopy policy = {_linked};
|
StringStoragePolicy::LinkOrCopy policy = {_linked};
|
||||||
return policy;
|
return policy;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ class ZeroTerminatedRamString {
|
|||||||
return stringCompare(a, b) == 0;
|
return stringCompare(a, b) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringStoragePolicy::Copy storagePolicy() {
|
StringStoragePolicy::Copy storagePolicy() const {
|
||||||
return StringStoragePolicy::Copy();
|
return StringStoragePolicy::Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class StaticStringAdapter : public ZeroTerminatedRamString {
|
|||||||
public:
|
public:
|
||||||
StaticStringAdapter(const char* str) : ZeroTerminatedRamString(str) {}
|
StaticStringAdapter(const char* str) : ZeroTerminatedRamString(str) {}
|
||||||
|
|
||||||
StringStoragePolicy::Link storagePolicy() {
|
StringStoragePolicy::Link storagePolicy() const {
|
||||||
return StringStoragePolicy::Link();
|
return StringStoragePolicy::Link();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -121,7 +121,7 @@ class SizedRamString {
|
|||||||
return _str;
|
return _str;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringStoragePolicy::Copy storagePolicy() {
|
StringStoragePolicy::Copy storagePolicy() const {
|
||||||
return StringStoragePolicy::Copy();
|
return StringStoragePolicy::Copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user