summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/input_event.cpp3
-rw-r--r--core/os/keyboard.cpp7
-rw-r--r--core/os/mutex.cpp2
3 files changed, 9 insertions, 3 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 3cc595208f..4ef99558ad 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -39,6 +39,8 @@ bool InputEvent::operator==(const InputEvent &p_event) const {
}
switch(type) {
+ /** Current clang-format style doesn't play well with the aligned return values of that switch. */
+ /* clang-format off */
case NONE:
return true;
case KEY:
@@ -80,6 +82,7 @@ bool InputEvent::operator==(const InputEvent &p_event) const {
case ACTION:
return action.action == p_event.action.action
&& action.pressed == p_event.action.pressed;
+ /* clang-format on */
default:
ERR_PRINT("No logic to compare InputEvents of this type, this shouldn't happen.");
}
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 309348ea31..40fa86d09f 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -36,6 +36,7 @@ struct _KeyCodeText {
static const _KeyCodeText _keycodes[]={
+ /* clang-format off */
{KEY_ESCAPE ,"Escape"},
{KEY_TAB ,"Tab"},
{KEY_BACKTAB ,"BackTab"},
@@ -281,7 +282,8 @@ static const _KeyCodeText _keycodes[]={
{KEY_DIVISION ,"Division"},
{KEY_YDIAERESIS ,"Ydiaeresis"},
- {0 ,0}
+ {0 ,0}
+ /* clang-format on */
};
bool keycode_has_unicode(uint32_t p_keycode) {
@@ -299,7 +301,8 @@ bool keycode_has_unicode(uint32_t p_keycode) {
case KEY_MEDIAPREVIOUS: case KEY_MEDIANEXT: case KEY_MEDIARECORD: case KEY_HOMEPAGE: case KEY_FAVORITES: case KEY_SEARCH: case KEY_STANDBY:
case KEY_OPENURL: case KEY_LAUNCHMAIL: case KEY_LAUNCHMEDIA: case KEY_LAUNCH0: case KEY_LAUNCH1: case KEY_LAUNCH2: case KEY_LAUNCH3: case KEY_LAUNCH4:
case KEY_LAUNCH5: case KEY_LAUNCH6: case KEY_LAUNCH7: case KEY_LAUNCH8: case KEY_LAUNCH9: case KEY_LAUNCHA: case KEY_LAUNCHB: case KEY_LAUNCHC: case KEY_LAUNCHD:
- case KEY_LAUNCHE: case KEY_LAUNCHF: return false;
+ case KEY_LAUNCHE: case KEY_LAUNCHF:
+ return false;
}
return true;
diff --git a/core/os/mutex.cpp b/core/os/mutex.cpp
index f5f7f757c3..acdcb492d9 100644
--- a/core/os/mutex.cpp
+++ b/core/os/mutex.cpp
@@ -47,7 +47,7 @@ Mutex::~Mutex() {
}
-Mutex *_global_mutex=NULL;;
+Mutex *_global_mutex=NULL;
void _global_lock() {