Merge branch 'master' into 6.x

This commit is contained in:
Benoit Blanchon
2018-06-04 17:44:10 +02:00
12 changed files with 104 additions and 14 deletions

View File

@@ -10,7 +10,9 @@ namespace Internals {
template <typename TChar>
struct CharPointerTraits {
static bool equals(const TChar* str, const char* expected) {
return strcmp(reinterpret_cast<const char*>(str), expected) == 0;
const char* actual = reinterpret_cast<const char*>(str);
if (!actual || !expected) return actual == expected;
return strcmp(actual, expected) == 0;
}
static bool is_null(const TChar* str) {