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
|
@ -94,7 +94,7 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
for (List<StringName>::Element *E = base_list.front(); E; E = E->next()) {
|
||||
List<MethodInfo> methods;
|
||||
List<PropertyInfo> props;
|
||||
TreeItem *category = NULL;
|
||||
TreeItem *category = nullptr;
|
||||
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
|
||||
Control::get_icon("Variant", "EditorIcons"),
|
||||
Control::get_icon("bool", "EditorIcons"),
|
||||
|
@ -191,7 +191,7 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
if (type != Variant::NIL) {
|
||||
Variant v;
|
||||
Variant::CallError ce;
|
||||
v = Variant::construct(type, NULL, 0, ce);
|
||||
v = Variant::construct(type, nullptr, 0, ce);
|
||||
v.get_method_list(&methods);
|
||||
} else {
|
||||
Object *obj = ObjectDB::get_instance(script);
|
||||
|
@ -256,7 +256,7 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
item->set_metadata(2, connecting);
|
||||
}
|
||||
|
||||
if (category && category->get_children() == NULL) {
|
||||
if (category && category->get_children() == nullptr) {
|
||||
memdelete(category); //old category was unused
|
||||
}
|
||||
}
|
||||
|
@ -296,12 +296,12 @@ void VisualScriptPropertySelector::_update_search() {
|
|||
}
|
||||
|
||||
TreeItem *selected_item = search_options->search_item_text(search_box->get_text());
|
||||
if (!found && selected_item != NULL) {
|
||||
if (!found && selected_item != nullptr) {
|
||||
selected_item->select(0);
|
||||
found = true;
|
||||
}
|
||||
|
||||
get_ok()->set_disabled(root->get_children() == NULL);
|
||||
get_ok()->set_disabled(root->get_children() == nullptr);
|
||||
}
|
||||
|
||||
void VisualScriptPropertySelector::create_visualscript_item(const String &name, TreeItem *const root, const String &search_input, const String &text) {
|
||||
|
@ -469,7 +469,7 @@ void VisualScriptPropertySelector::_item_selected() {
|
|||
|
||||
List<String> *names = memnew(List<String>);
|
||||
VisualScriptLanguage::singleton->get_registered_node_names(names);
|
||||
if (names->find(name) != NULL) {
|
||||
if (names->find(name) != nullptr) {
|
||||
Ref<VisualScriptOperator> operator_node = VisualScriptLanguage::singleton->create_node_from_name(name);
|
||||
if (operator_node.is_valid()) {
|
||||
Map<String, DocData::ClassDoc>::Element *F = dd->class_list.find(operator_node->get_class_name());
|
||||
|
@ -518,7 +518,7 @@ void VisualScriptPropertySelector::select_method_from_base_type(const String &p_
|
|||
type = Variant::NIL;
|
||||
script = 0;
|
||||
properties = false;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = p_virtuals_only;
|
||||
|
||||
show_window(.5f);
|
||||
|
@ -543,7 +543,7 @@ void VisualScriptPropertySelector::select_from_base_type(const String &p_base, c
|
|||
script = 0;
|
||||
properties = true;
|
||||
visual_script_generic = false;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = p_virtuals_only;
|
||||
|
||||
show_window(.5f);
|
||||
|
@ -567,7 +567,7 @@ void VisualScriptPropertySelector::select_from_script(const Ref<Script> &p_scrip
|
|||
script = p_script->get_instance_id();
|
||||
properties = true;
|
||||
visual_script_generic = false;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = false;
|
||||
|
||||
show_window(.5f);
|
||||
|
@ -590,7 +590,7 @@ void VisualScriptPropertySelector::select_from_basic_type(Variant::Type p_type,
|
|||
script = 0;
|
||||
properties = true;
|
||||
visual_script_generic = false;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = false;
|
||||
|
||||
show_window(.5f);
|
||||
|
@ -612,7 +612,7 @@ void VisualScriptPropertySelector::select_from_action(const String &p_type, cons
|
|||
script = 0;
|
||||
properties = false;
|
||||
visual_script_generic = false;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = false;
|
||||
|
||||
show_window(.5f);
|
||||
|
@ -656,7 +656,7 @@ void VisualScriptPropertySelector::select_from_visual_script(const String &p_bas
|
|||
script = 0;
|
||||
properties = true;
|
||||
visual_script_generic = true;
|
||||
instance = NULL;
|
||||
instance = nullptr;
|
||||
virtuals_only = false;
|
||||
show_window(.5f);
|
||||
if (clear_text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue