diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2014-10-07 23:25:37 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2014-10-07 23:25:37 +0200 |
commit | 342210b0628d417a32f375efbfbd91f5537ab148 (patch) | |
tree | 502a67a43620bb10babc15c15965669431af7f57 /src/common/resources/sndfile.cpp | |
parent | 12feb49098b3fdcaa489ceb557a4461b5cdebcf9 (diff) | |
download | colobot-342210b0628d417a32f375efbfbd91f5537ab148.tar.gz colobot-342210b0628d417a32f375efbfbd91f5537ab148.tar.bz2 colobot-342210b0628d417a32f375efbfbd91f5537ab148.zip |
GCC 4.6 compilation fixes
Diffstat (limited to 'src/common/resources/sndfile.cpp')
-rw-r--r-- | src/common/resources/sndfile.cpp | 9 |
1 files changed, 6 insertions, 3 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"; |