summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/settings_gui.cpp2
-rw-r--r--src/stdafx.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 9ab299594..76b682e8f 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1153,7 +1153,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd
if (sdb->cmd == SDT_BOOLX) {
static const Colours _bool_ctabs[2][2] = {{COLOUR_CREAM, COLOUR_RED}, {COLOUR_DARK_GREEN, COLOUR_GREEN}};
/* Draw checkbox for boolean-value either on/off */
- bool on = (bool)ReadValue(var, sd->save.conv);
+ bool on = ReadValue(var, sd->save.conv) != 0;
DrawFrameRect(buttons_left, button_y, buttons_left + 19, button_y + 8, _bool_ctabs[!!on][!!editable], on ? FR_LOWERED : FR_NONE);
SetDParam(0, on ? STR_CONFIG_SETTING_ON : STR_CONFIG_SETTING_OFF);
diff --git a/src/stdafx.h b/src/stdafx.h
index 8a8595722..0c7507ff8 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -164,7 +164,7 @@
#error "Only MSVC 2005 or higher are supported. MSVC 2003 and earlier are not! Upgrade your compiler."
#endif /* (_MSC_VER < 1400) */
#pragma warning(disable: 4291) // no matching operator delete found; memory will not be freed if initialization throws an exception (reason: our overloaded functions never throw an exception)
- #pragma warning(disable: 4996) // 'strdup' was declared deprecated
+ #pragma warning(disable: 4996) // 'function': was declared deprecated
#define _CRT_SECURE_NO_DEPRECATE // all deprecated 'unsafe string functions
#pragma warning(disable: 6308) // code analyzer: 'realloc' might return null pointer: assigning null pointer to 't_ptr', which is passed as an argument to 'realloc', will cause the original memory block to be leaked
#pragma warning(disable: 6011) // code analyzer: Dereferencing NULL pointer 'pfGetAddrInfo': Lines: 995, 996, 998, 999, 1001