[colobot] 82/390: GCC 4.6 compilation fixes
Didier Raboud
odyx at moszumanska.debian.org
Fri Jun 12 14:21:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch upstream/latest
in repository colobot.
commit 342210b0628d417a32f375efbfbd91f5537ab148
Author: Piotr Dziwinski <piotrdz at gmail.com>
Date: Tue Oct 7 23:25:37 2014 +0200
GCC 4.6 compilation fixes
---
src/common/resources/sndfile.cpp | 9 ++++++---
src/common/resources/sndfile.h | 9 +--------
src/object/level/parserexceptions.h | 5 ++++-
3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/common/resources/sndfile.cpp b/src/common/resources/sndfile.cpp
index b71f06a..d9d4ccb 100644
--- a/src/common/resources/sndfile.cpp
+++ b/src/common/resources/sndfile.cpp
@@ -20,9 +20,12 @@
CSNDFile::CSNDFile(const std::string& filename)
+ : m_file_info{}
+ , m_snd_file{nullptr}
+ , m_file{nullptr}
+ , m_last_error{}
+ , m_snd_callbacks{SNDLength, SNDSeek, SNDRead, SNDWrite, SNDTell}
{
- memset(&m_file_info, 0, sizeof(SF_INFO));
-
if (PHYSFS_isInit())
{
m_file = PHYSFS_openRead(filename.c_str());
@@ -33,7 +36,7 @@ CSNDFile::CSNDFile(const std::string& filename)
}
if (m_file)
{
- m_snd_file = sf_open_virtual(&snd_callbacks, SFM_READ, &m_file_info, m_file);
+ m_snd_file = sf_open_virtual(&m_snd_callbacks, SFM_READ, &m_file_info, m_file);
if (!m_snd_file)
{
m_last_error = "Could not load file";
diff --git a/src/common/resources/sndfile.h b/src/common/resources/sndfile.h
index 5fc00f4..7d6d589 100644
--- a/src/common/resources/sndfile.h
+++ b/src/common/resources/sndfile.h
@@ -42,12 +42,5 @@ private:
SNDFILE *m_snd_file;
PHYSFS_File *m_file;
std::string m_last_error;
-
- SF_VIRTUAL_IO snd_callbacks = {
- SNDLength,
- SNDSeek,
- SNDRead,
- SNDWrite,
- SNDTell
- };
+ SF_VIRTUAL_IO m_snd_callbacks;
};
diff --git a/src/object/level/parserexceptions.h b/src/object/level/parserexceptions.h
index 813467f..ca87ce1 100644
--- a/src/object/level/parserexceptions.h
+++ b/src/object/level/parserexceptions.h
@@ -30,8 +30,9 @@ class CLevelParserException : public std::exception
{
public:
CLevelParserException(std::string message) noexcept;
+ virtual ~CLevelParserException() noexcept {}
const char* what() const noexcept;
-
+
protected:
std::string m_message;
};
@@ -40,10 +41,12 @@ class CLevelParserExceptionMissingParam : public CLevelParserException
{
public:
CLevelParserExceptionMissingParam(CLevelParserParam* thisParam) noexcept;
+ virtual ~CLevelParserExceptionMissingParam() noexcept {}
};
class CLevelParserExceptionBadParam : public CLevelParserException
{
public:
CLevelParserExceptionBadParam(CLevelParserParam* thisParam, std::string requestedType) noexcept;
+ virtual ~CLevelParserExceptionBadParam() noexcept {}
};
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list