diff options
Diffstat (limited to 'core/undo_redo.cpp')
-rw-r--r-- | core/undo_redo.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index 02f460c93d..62ad3e9f98 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -108,7 +108,7 @@ void UndoRedo::create_action(const String &p_name, MergeMode p_mode) { void UndoRedo::add_do_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) { VARIANT_ARGPTRS - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; @@ -128,7 +128,7 @@ void UndoRedo::add_do_method(Object *p_object, const StringName &p_method, VARIA void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) { VARIANT_ARGPTRS - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); @@ -151,7 +151,7 @@ void UndoRedo::add_undo_method(Object *p_object, const StringName &p_method, VAR } void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, const Variant &p_value) { - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; @@ -166,7 +166,7 @@ void UndoRedo::add_do_property(Object *p_object, const StringName &p_property, c } void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property, const Variant &p_value) { - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); @@ -186,7 +186,7 @@ void UndoRedo::add_undo_property(Object *p_object, const StringName &p_property, } void UndoRedo::add_do_reference(Object *p_object) { - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; @@ -199,7 +199,7 @@ void UndoRedo::add_do_reference(Object *p_object) { } void UndoRedo::add_undo_reference(Object *p_object) { - ERR_FAIL_COND(p_object == NULL); + ERR_FAIL_COND(p_object == nullptr); ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); @@ -417,13 +417,13 @@ UndoRedo::UndoRedo() { current_action = -1; merge_mode = MERGE_DISABLE; merging = false; - callback = NULL; - callback_ud = NULL; + callback = nullptr; + callback_ud = nullptr; - method_callbck_ud = NULL; - prop_callback_ud = NULL; - method_callback = NULL; - property_callback = NULL; + method_callbck_ud = nullptr; + prop_callback_ud = nullptr; + method_callback = nullptr; + property_callback = nullptr; } UndoRedo::~UndoRedo() { @@ -511,8 +511,7 @@ void UndoRedo::_bind_methods() { ClassDB::bind_method(D_METHOD("create_action", "name", "merge_mode"), &UndoRedo::create_action, DEFVAL(MERGE_DISABLE)); ClassDB::bind_method(D_METHOD("commit_action"), &UndoRedo::commit_action); - // FIXME: Typo in "commiting", fix in 4.0 when breaking compat. - ClassDB::bind_method(D_METHOD("is_commiting_action"), &UndoRedo::is_committing_action); + ClassDB::bind_method(D_METHOD("is_committing_action"), &UndoRedo::is_committing_action); { MethodInfo mi; |