mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
This commit is contained in:
@@ -1852,7 +1852,7 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
|
||||
* necessary unless F is present. The "E" may
|
||||
* actually be an "e". E and X may both be
|
||||
* omitted (but not just one). */
|
||||
C **endPtr = NULL) /* If non-NULL, store terminating Cacter's
|
||||
C **endPtr = nullptr) /* If non-NULL, store terminating Cacter's
|
||||
* address here. */
|
||||
{
|
||||
static const int maxExponent = 511; /* Largest possible base 10 exponent. Any
|
||||
@@ -2039,7 +2039,7 @@ static double built_in_strtod(const C *string, /* A decimal ASCII floating-point
|
||||
}
|
||||
|
||||
done:
|
||||
if (endPtr != NULL) {
|
||||
if (endPtr != nullptr) {
|
||||
*endPtr = (C *)p;
|
||||
}
|
||||
|
||||
@@ -3298,7 +3298,7 @@ String String::http_unescape() const {
|
||||
CharType ord2 = ord_at(i + 2);
|
||||
if ((ord2 >= '0' && ord2 <= '9') || (ord2 >= 'A' && ord2 <= 'Z')) {
|
||||
char bytes[3] = { (char)ord1, (char)ord2, 0 };
|
||||
res += (char)strtol(bytes, NULL, 16);
|
||||
res += (char)strtol(bytes, nullptr, 16);
|
||||
i += 2;
|
||||
}
|
||||
} else {
|
||||
@@ -3464,7 +3464,7 @@ static _FORCE_INLINE_ int _xml_unescape(const CharType *p_src, int p_src_len, Ch
|
||||
String String::xml_unescape() const {
|
||||
String str;
|
||||
int l = length();
|
||||
int len = _xml_unescape(c_str(), l, NULL);
|
||||
int len = _xml_unescape(c_str(), l, nullptr);
|
||||
if (len == 0)
|
||||
return String();
|
||||
str.resize(len + 1);
|
||||
|
||||
Reference in New Issue
Block a user