diff options
Diffstat (limited to 'core/os/os.cpp')
-rw-r--r-- | core/os/os.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp index 3a06a3fa8f..764f7fe6e6 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -64,12 +64,13 @@ void OS::debug_break(){ void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) { - const char *err_type; + const char *err_type = "**ERROR**"; switch (p_type) { case ERR_ERROR: err_type = "**ERROR**"; break; case ERR_WARNING: err_type = "**WARNING**"; break; case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break; case ERR_SHADER: err_type = "**SHADER ERROR**"; break; + default: ERR_PRINT("Unknown error type"); break; } if (p_rationale && *p_rationale) @@ -171,7 +172,7 @@ static FileAccess *_OSPRF = NULL; static void _OS_printres(Object *p_obj) { - Resource *res = p_obj->cast_to<Resource>(); + Resource *res = Object::cast_to<Resource>(p_obj); if (!res) return; |