From 544e513148b0e8b03059a3ac2d5414d59547f4f2 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Mon, 27 Apr 2015 18:16:37 +0200 Subject: [PATCH] Minor MSVC compilation fixes --- src/common/resources/sndfile.cpp | 2 +- src/script/scriptfunc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/resources/sndfile.cpp b/src/common/resources/sndfile.cpp index d2330e1b..e7e2f4c0 100644 --- a/src/common/resources/sndfile.cpp +++ b/src/common/resources/sndfile.cpp @@ -27,8 +27,8 @@ CSNDFile::CSNDFile(const std::string& filename) , m_snd_file{nullptr} , m_file{nullptr} , m_last_error{} - , m_snd_callbacks{SNDLength, SNDSeek, SNDRead, SNDWrite, SNDTell} { + m_snd_callbacks = { SNDLength, SNDSeek, SNDRead, SNDWrite, SNDTell }; if (PHYSFS_isInit()) { m_file = PHYSFS_openRead(filename.c_str()); diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 9d3b8bf3..77c622c3 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -356,7 +356,7 @@ bool CScriptFunctions::rEndMission(CBotVar* var, CBotVar* result, int& exception Error ended; float delay; - ended = static_cast(var->GetValFloat()); + ended = static_cast(static_cast(var->GetValFloat())); // TODO: is this correct?! var = var->GetNext(); delay = var->GetValFloat();