// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2019 // MIT License #pragma once #include "./StringCopier.hpp" #include "./StringMover.hpp" namespace ARDUINOJSON_NAMESPACE { template struct StringStorage { typedef StringCopier type; static type create(MemoryPool& pool, TInput&) { return type(&pool); } }; template struct StringStorage::value>::type> { typedef StringMover type; static type create(MemoryPool&, TChar* input) { return type(reinterpret_cast(input)); } }; template typename StringStorage::type makeStringStorage(MemoryPool& pool, TInput& input) { return StringStorage::create(pool, input); } template typename StringStorage::type makeStringStorage(MemoryPool& pool, TChar* input) { return StringStorage::create(pool, input); } } // namespace ARDUINOJSON_NAMESPACE