aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/property_editor.cpp
diff options
context:
space:
mode:
authorThaer Razeq2017-02-23 02:28:09 -0600
committerREBELLIOUSX\Rebel_X2017-02-28 07:52:02 -0600
commitf50488a36188d5975bfa8554687a1acdd394d6a9 (patch)
tree3b8712b9162aeb30e8eaaeeca63e6d04c7b9e3b5 /tools/editor/property_editor.cpp
parent0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff)
downloadgodot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.gz
godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.zst
godot-f50488a36188d5975bfa8554687a1acdd394d6a9.zip
Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
Diffstat (limited to '')
-rw-r--r--tools/editor/property_editor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index a9a5956f2..ec1de03bd 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -534,7 +534,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
} else if (hint==PROPERTY_HINT_TYPE_STRING) {
-
+ /* FIXME: This is repeated twice, with slightly different behavior! Which one? Check line 644 */
if (!create_dialog) {
create_dialog = memnew( CreateDialog );
create_dialog->connect("create",this,"_create_dialog_callback");
@@ -651,6 +651,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
} else if (hint==PROPERTY_HINT_TYPE_STRING) {
if (!create_dialog) {
+ /* FIXME: ... and here. See line 529 */
create_dialog = memnew( CreateDialog );
create_dialog->connect("create",this,"_create_dialog_callback");
add_child(create_dialog);
@@ -2384,6 +2385,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
p_item->set_range(1, obj->get( p_name ) );
} else {
+ /* FIXME: Why are both statements equal? */
p_item->set_range(1, obj->get( p_name ) );
}