diff options
author | rune-scape <allie.smith.epic@gmail.com> | 2023-12-28 14:44:23 -0800 |
---|---|---|
committer | rune-scape <spartacrafter@gmail.com> | 2024-08-29 13:39:27 -0700 |
commit | 154049ce1792a6e12b990e0a414a6c084c3b91c5 (patch) | |
tree | 102bda57c74f9efaa227c970255327f734043ce9 /editor/editor_undo_redo_manager.cpp | |
parent | 40b378e9e2338d84f897f6991cc913a713295785 (diff) | |
download | redot-engine-154049ce1792a6e12b990e0a414a6c084c3b91c5.tar.gz |
StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
Diffstat (limited to 'editor/editor_undo_redo_manager.cpp')
-rw-r--r-- | editor/editor_undo_redo_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_undo_redo_manager.cpp b/editor/editor_undo_redo_manager.cpp index 55bc198dfb..b55a951b49 100644 --- a/editor/editor_undo_redo_manager.cpp +++ b/editor/editor_undo_redo_manager.cpp @@ -177,7 +177,7 @@ void EditorUndoRedoManager::_add_do_method(const Variant **p_args, int p_argcoun return; } - if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) { + if (!p_args[1]->is_string()) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING_NAME; @@ -206,7 +206,7 @@ void EditorUndoRedoManager::_add_undo_method(const Variant **p_args, int p_argco return; } - if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) { + if (!p_args[1]->is_string()) { r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT; r_error.argument = 1; r_error.expected = Variant::STRING_NAME; |