You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Fix some warnings raised by MSVC 2017
Disabled signed/unsigned warnings like for GCC/Clang (warning C4018: '>=': signed/unsigned mismatch). Fixes the following MSVC 2017 warnings: ``` core\image.cpp(999): warning C4804: '>': unsafe use of type 'bool' in operation core\io\compression.cpp(178): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\doc\doc_dump.cpp(226): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(289): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(298): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\editor_themes.cpp(379): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation ```
This commit is contained in:
@@ -376,7 +376,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
||||
//Register icons + font
|
||||
|
||||
// the resolution and the icon color (dark_theme bool) has not changed, so we do not regenerate the icons
|
||||
if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
|
||||
if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && (bool)p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
|
||||
// register already generated icons
|
||||
for (int i = 0; i < editor_icons_count; i++) {
|
||||
theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
|
||||
|
||||
Reference in New Issue
Block a user