1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Fix more MSVC C4702 (unreachable code) warnings

This commit is contained in:
Rémi Verschelde
2022-10-07 14:43:59 +02:00
parent 58ca303141
commit 62b066dbd6
2 changed files with 6 additions and 8 deletions

View File

@@ -1929,8 +1929,6 @@ String Variant::stringify(int recursion_count) const {
return "<" + get_type_name(type) + ">"; return "<" + get_type_name(type) + ">";
} }
} }
return "";
} }
String Variant::to_json_string() const { String Variant::to_json_string() const {

View File

@@ -479,9 +479,9 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
result.output = get_text_for_status(result.status) + "\n"; result.output = get_text_for_status(result.status) + "\n";
const List<GDScriptParser::ParserError> &errors = parser.get_errors(); const List<GDScriptParser::ParserError> &errors = parser.get_errors();
for (const GDScriptParser::ParserError &E : errors) { if (!errors.is_empty()) {
result.output += E.message + "\n"; // TODO: line, column? // Only the first error since the following might be cascading.
break; // Only the first error since the following might be cascading. result.output += errors[0].message + "\n"; // TODO: line, column?
} }
if (!p_is_generating) { if (!p_is_generating) {
result.passed = check_output(result.output); result.passed = check_output(result.output);
@@ -498,9 +498,9 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
result.output = get_text_for_status(result.status) + "\n"; result.output = get_text_for_status(result.status) + "\n";
const List<GDScriptParser::ParserError> &errors = parser.get_errors(); const List<GDScriptParser::ParserError> &errors = parser.get_errors();
for (const GDScriptParser::ParserError &E : errors) { if (!errors.is_empty()) {
result.output += E.message + "\n"; // TODO: line, column? // Only the first error since the following might be cascading.
break; // Only the first error since the following might be cascading. result.output += errors[0].message + "\n"; // TODO: line, column?
} }
if (!p_is_generating) { if (!p_is_generating) {
result.passed = check_output(result.output); result.passed = check_output(result.output);