mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Added support for Printable (closes #1444)
This commit is contained in:
@@ -244,16 +244,26 @@ class VariantData {
|
||||
setType(VALUE_IS_NULL);
|
||||
}
|
||||
|
||||
void setStringPointer(const char *s, storage_policies::store_by_copy) {
|
||||
void setOwnedString(const char *s) {
|
||||
ARDUINOJSON_ASSERT(s != 0);
|
||||
setType(VALUE_IS_OWNED_STRING);
|
||||
_content.asString = s;
|
||||
}
|
||||
|
||||
void setStringPointer(const char *s, storage_policies::store_by_address) {
|
||||
void setLinkedString(const char *s) {
|
||||
ARDUINOJSON_ASSERT(s != 0);
|
||||
setType(VALUE_IS_LINKED_STRING);
|
||||
_content.asString = s;
|
||||
}
|
||||
|
||||
void setStringPointer(const char *s, storage_policies::store_by_copy) {
|
||||
setOwnedString(s);
|
||||
}
|
||||
|
||||
void setStringPointer(const char *s, storage_policies::store_by_address) {
|
||||
setLinkedString(s);
|
||||
}
|
||||
|
||||
template <typename TAdaptedString>
|
||||
bool setString(TAdaptedString value, MemoryPool *pool) {
|
||||
return setString(value, pool, typename TAdaptedString::storage_policy());
|
||||
|
||||
Reference in New Issue
Block a user