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:
Rémi Verschelde
2021-05-04 16:00:45 +02:00
parent 2b429b24b5
commit a828398655
633 changed files with 4454 additions and 4410 deletions

View File

@ -303,7 +303,7 @@ MainLoop *test() {
if (cmdlargs.empty()) {
//try editor!
print_line("usage: godot -test shader_lang <shader>");
return NULL;
return nullptr;
}
String test = cmdlargs.back()->get();
@ -311,7 +311,7 @@ MainLoop *test() {
FileAccess *fa = FileAccess::open(test, FileAccess::READ);
if (!fa) {
ERR_FAIL_V(NULL);
ERR_FAIL_V(nullptr);
}
String code;
@ -339,13 +339,13 @@ MainLoop *test() {
if (err) {
print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text());
return NULL;
return nullptr;
} else {
String code2;
recreate_code(&code2, sl.get_shader());
print_line("code:\n\n" + code2);
}
return NULL;
return nullptr;
}
} // namespace TestShaderLang