mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00: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:
parent
2b429b24b5
commit
a828398655
633 changed files with 4454 additions and 4410 deletions
|
@ -172,7 +172,7 @@ static const _bit _type_list[] = {
|
|||
{ Variant::POOL_VECTOR2_ARRAY, "PoolVector2Array" },
|
||||
{ Variant::POOL_VECTOR3_ARRAY, "PoolVector3Array" },
|
||||
{ Variant::POOL_COLOR_ARRAY, "PoolColorArray" },
|
||||
{ Variant::VARIANT_MAX, NULL },
|
||||
{ Variant::VARIANT_MAX, nullptr },
|
||||
};
|
||||
|
||||
struct _kws {
|
||||
|
@ -232,7 +232,7 @@ static const _kws _keyword_list[] = {
|
|||
{ GDScriptTokenizer::TK_WILDCARD, "_" },
|
||||
{ GDScriptTokenizer::TK_CONST_INF, "INF" },
|
||||
{ GDScriptTokenizer::TK_CONST_NAN, "NAN" },
|
||||
{ GDScriptTokenizer::TK_ERROR, NULL }
|
||||
{ GDScriptTokenizer::TK_ERROR, nullptr }
|
||||
};
|
||||
|
||||
const char *GDScriptTokenizer::get_token_name(Token p_token) {
|
||||
|
@ -1055,7 +1055,7 @@ void GDScriptTokenizerText::set_code(const String &p_code) {
|
|||
if (len) {
|
||||
_code = &code[0];
|
||||
} else {
|
||||
_code = NULL;
|
||||
_code = nullptr;
|
||||
}
|
||||
code_pos = 0;
|
||||
line = 1; //it is stand-ar-ized that lines begin in 1 in code..
|
||||
|
@ -1317,7 +1317,7 @@ Vector<uint8_t> GDScriptTokenizerBuffer::parse_code_string(const String &p_code)
|
|||
}
|
||||
|
||||
Map<int, Variant> rev_constant_map;
|
||||
const Variant *K = NULL;
|
||||
const Variant *K = nullptr;
|
||||
while ((K = constant_map.next(K))) {
|
||||
rev_constant_map[constant_map[*K]] = *K;
|
||||
}
|
||||
|
@ -1364,7 +1364,7 @@ Vector<uint8_t> GDScriptTokenizerBuffer::parse_code_string(const String &p_code)
|
|||
for (Map<int, Variant>::Element *E = rev_constant_map.front(); E; E = E->next()) {
|
||||
int len;
|
||||
// Objects cannot be constant, never encode objects
|
||||
Error err = encode_variant(E->get(), NULL, len, false);
|
||||
Error err = encode_variant(E->get(), nullptr, len, false);
|
||||
ERR_FAIL_COND_V_MSG(err != OK, Vector<uint8_t>(), "Error when trying to encode Variant.");
|
||||
int pos = buf.size();
|
||||
buf.resize(pos + len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue