summaryrefslogtreecommitdiffstats
path: root/editor/debugger/editor_debugger_inspector.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:41:43 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 21:57:34 +0200
commit0ee0fa42e6639b6fa474b7cf6afc6b1a78142185 (patch)
tree198d4ff7665d89307f6ca2469fa38620a9eb1672 /editor/debugger/editor_debugger_inspector.cpp
parent07bc4e2f96f8f47991339654ff4ab16acc19d44f (diff)
downloadredot-engine-0ee0fa42e6639b6fa474b7cf6afc6b1a78142185.tar.gz
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
Diffstat (limited to 'editor/debugger/editor_debugger_inspector.cpp')
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index 0c5fce91a6..125439d09b 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -36,8 +36,9 @@
#include "scene/debugger/scene_debugger.h"
bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p_value) {
- if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/"))
+ if (!editable || !prop_values.has(p_name) || String(p_name).begins_with("Constants/")) {
return false;
+ }
prop_values[p_name] = p_value;
emit_signal("value_edited", remote_object_id, p_name, p_value);
@@ -45,8 +46,9 @@ bool EditorDebuggerRemoteObject::_set(const StringName &p_name, const Variant &p
}
bool EditorDebuggerRemoteObject::_get(const StringName &p_name, Variant &r_ret) const {
- if (!prop_values.has(p_name))
+ if (!prop_values.has(p_name)) {
return false;
+ }
r_ret = prop_values[p_name];
return true;
@@ -60,10 +62,11 @@ void EditorDebuggerRemoteObject::_get_property_list(List<PropertyInfo> *p_list)
}
String EditorDebuggerRemoteObject::get_title() {
- if (remote_object_id.is_valid())
+ if (remote_object_id.is_valid()) {
return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id);
- else
+ } else {
return "<null>";
+ }
}
Variant EditorDebuggerRemoteObject::get_variant(const StringName &p_name) {
@@ -211,8 +214,9 @@ void EditorDebuggerInspector::clear_cache() {
}
Object *EditorDebuggerInspector::get_object(ObjectID p_id) {
- if (remote_objects.has(p_id))
+ if (remote_objects.has(p_id)) {
return remote_objects[p_id];
+ }
return nullptr;
}