From 11abf36c99fbdf8a3ed9da1f794d9c92f9a7753d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 13 Oct 2024 20:25:03 +0200 Subject: [PATCH] Clang format --- editor/limbo_ai_editor_plugin.cpp | 3 +-- register_types.cpp | 2 +- util/limbo_compat.h | 13 +++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index f3e428b..2c80971 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -288,8 +288,7 @@ void LimboAIEditor::edit_bt(const Ref &p_behavior_tree, bool p_for if (idx_history >= 0 && idx_history < history.size()) { if (tab_search_context.has(history[idx_history])) { task_tree->tree_search_set_search_info(tab_search_context[history[idx_history]]); - } - else { + } else { task_tree->tree_search_set_search_info(TreeSearch::SearchInfo()); } } diff --git a/register_types.cpp b/register_types.cpp index 162df4b..2bcce87 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -101,12 +101,12 @@ #include "editor/debugger/limbo_debugger.h" #include "editor/debugger/limbo_debugger_plugin.h" #include "editor/mode_switch_button.h" +#include "editor/tree_search.h" #include "hsm/limbo_hsm.h" #include "hsm/limbo_state.h" #include "util/limbo_string_names.h" #include "util/limbo_task_db.h" #include "util/limbo_utility.h" -#include "editor/tree_search.h" #ifdef TOOLS_ENABLED #include "editor/debugger/behavior_tree_view.h" diff --git a/util/limbo_compat.h b/util/limbo_compat.h index bb0e581..6f1da9e 100644 --- a/util/limbo_compat.h +++ b/util/limbo_compat.h @@ -114,12 +114,13 @@ using namespace godot; #define ADD_STYLEBOX_OVERRIDE(m_control, m_name, m_stylebox) (m_control->add_theme_stylebox_override(m_name, m_stylebox)) #define GET_NODE(m_parent, m_path) m_parent->get_node_internal(m_path) #define OBJECT_DB_GET_INSTANCE(m_id) ObjectDB::get_instance(m_id) -#define EDITOR_DEF(m_setting, m_value) do { /* do-while(0) ideom to avoid any potential semicolon errors. */\ - EditorInterface::get_singleton()->get_editor_settings()->set_initial_value(m_setting, m_value, false); \ - if (!EDITOR_SETTINGS()->has_setting(m_setting)) { \ - EDITOR_SETTINGS()->set_setting(m_setting, m_value); \ - } \ - } while(0) +#define EDITOR_DEF(m_setting, m_value) \ + do { /* do-while(0) ideom to avoid any potential semicolon errors. */ \ + EditorInterface::get_singleton()->get_editor_settings()->set_initial_value(m_setting, m_value, false); \ + if (!EDITOR_SETTINGS()->has_setting(m_setting)) { \ + EDITOR_SETTINGS()->set_setting(m_setting, m_value); \ + } \ + } while (0) _FORCE_INLINE_ bool OBJECT_HAS_PROPERTY(Object *p_obj, const StringName &p_prop) { return Variant(p_obj).has_key(p_prop);