Remove useless null check

This commit is contained in:
Benoit Blanchon
2025-02-24 16:40:42 +01:00
parent 01e49b33b7
commit 9f3cf04415

View File

@ -90,8 +90,9 @@ struct StringAdapter<TChar[N], enable_if_t<IsChar<TChar>::value>> {
using AdaptedString = RamString;
static AdaptedString adapt(const TChar* p) {
ARDUINOJSON_ASSERT(p);
auto str = reinterpret_cast<const char*>(p);
return AdaptedString(str, str ? ::strlen(str) : 0);
return AdaptedString(str, ::strlen(str));
}
};