Browse Source

Avoid invocation to Object's copy constructor

Needed for the next commit. That's the only place in all the Godot code base
where that's attempted and it's not needed because Objects are not meant to
be copied that way.
Pedro J. Estébanez 5 years ago
parent
commit
07c4dc1b30
1 changed files with 5 additions and 5 deletions
  1. 5 5
      scene/gui/rich_text_label.cpp

+ 5 - 5
scene/gui/rich_text_label.cpp

@@ -2884,15 +2884,15 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi
 
 		Vector<String> values = parts[1].split(",", false);
 
-		RegEx color = RegEx();
+		RegEx color;
 		color.compile("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$");
-		RegEx nodepath = RegEx();
+		RegEx nodepath;
 		nodepath.compile("^\\$");
-		RegEx boolean = RegEx();
+		RegEx boolean;
 		boolean.compile("^(true|false)$");
-		RegEx decimal = RegEx();
+		RegEx decimal;
 		decimal.compile("^-?^.?\\d+(\\.\\d+?)?$");
-		RegEx numerical = RegEx();
+		RegEx numerical;
 		numerical.compile("^\\d+$");
 
 		for (int j = 0; j < values.size(); j++) {