Browse Source

Make direct casting among Error and godot_error enums (#23015).

marxin 6 years ago
parent
commit
66a43898d4
1 changed files with 1 additions and 2 deletions
  1. 1 2
      modules/gdnative/pluginscript/pluginscript_language.cpp

+ 1 - 2
modules/gdnative/pluginscript/pluginscript_language.cpp

@@ -173,8 +173,7 @@ Error PluginScriptLanguage::complete_code(const String &p_code, const String &p_
 		for (int i = 0; i < options.size(); i++) {
 		for (int i = 0; i < options.size(); i++) {
 			r_options->push_back(String(options[i]));
 			r_options->push_back(String(options[i]));
 		}
 		}
-		Error err = *(Error *)&tmp;
-		return err;
+		return (Error)tmp;
 	}
 	}
 	return ERR_UNAVAILABLE;
 	return ERR_UNAVAILABLE;
 }
 }