summaryrefslogtreecommitdiff
path: root/core/input
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-28 13:23:25 +0100
committerGitHub <noreply@github.com>2020-12-28 13:23:25 +0100
commitbe509bf5e4d00b33f2867e6d06a23285b2a8fd29 (patch)
tree975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /core/input
parent886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff)
parent5b937d493f0046543a77a0be7920ad39f1e5fc3c (diff)
Merge pull request #44401 from madmiraal/rename-empty-is_empty
Rename empty() to is_empty()
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input.cpp2
-rw-r--r--core/input/input_event.cpp2
-rw-r--r--core/input/input_map.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 153656e44a..c49193562e 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -806,7 +806,7 @@ void Input::accumulate_input_event(const Ref<InputEvent> &p_event) {
parse_input_event(p_event);
return;
}
- if (!accumulated_events.empty() && accumulated_events.back()->get()->accumulate(p_event)) {
+ if (!accumulated_events.is_empty() && accumulated_events.back()->get()->accumulate(p_event)) {
return; //event was accumulated, exit
}
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp
index 82bfaa82a5..bdfa5dff5f 100644
--- a/core/input/input_event.cpp
+++ b/core/input/input_event.cpp
@@ -210,7 +210,7 @@ String InputEventWithModifiers::as_text() const {
mod_names.push_back(find_keycode_name(KEY_META));
}
- if (!mod_names.empty()) {
+ if (!mod_names.is_empty()) {
return String("+").join(mod_names);
} else {
return "";
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index 979809c7af..45e2ddc71d 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -71,7 +71,7 @@ void InputMap::erase_action(const StringName &p_action) {
Array InputMap::_get_actions() {
Array ret;
List<StringName> actions = get_actions();
- if (actions.empty()) {
+ if (actions.is_empty()) {
return ret;
}
@@ -84,7 +84,7 @@ Array InputMap::_get_actions() {
List<StringName> InputMap::get_actions() const {
List<StringName> actions = List<StringName>();
- if (input_map.empty()) {
+ if (input_map.is_empty()) {
return actions;
}