mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01:00
Reorganized polyfills
This commit is contained in:
@@ -30,13 +30,13 @@ struct CharPointerTraits {
|
||||
|
||||
static const bool has_append = false;
|
||||
static const bool has_equals = true;
|
||||
static const bool should_duplicate = !IsConst<TChar>::value;
|
||||
static const bool should_duplicate = !is_const<TChar>::value;
|
||||
};
|
||||
|
||||
// char*, unsigned char*, signed char*
|
||||
// const char*, const unsigned char*, const signed char*
|
||||
template <typename TChar>
|
||||
struct StringTraits<TChar*, typename EnableIf<IsChar<TChar>::value>::type>
|
||||
struct StringTraits<TChar*, typename enable_if<sizeof(TChar) == 1>::type>
|
||||
: CharPointerTraits<TChar> {};
|
||||
}
|
||||
}
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include "../Configuration.hpp"
|
||||
#include "../TypeTraits/EnableIf.hpp"
|
||||
#include "../TypeTraits/IsBaseOf.hpp"
|
||||
#include "../TypeTraits/IsChar.hpp"
|
||||
#include "../TypeTraits/IsConst.hpp"
|
||||
#include "../TypeTraits/RemoveReference.hpp"
|
||||
#include "../Polyfills/type_traits.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
@@ -26,8 +22,8 @@ struct StringTraits<const TString, void> : StringTraits<TString> {};
|
||||
|
||||
template <typename TString>
|
||||
struct StringTraits<TString&, void> : StringTraits<TString> {};
|
||||
}
|
||||
}
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
|
||||
#include "CharPointer.hpp"
|
||||
#include "FlashString.hpp"
|
||||
|
||||
Reference in New Issue
Block a user