summaryrefslogtreecommitdiffstats
path: root/src/common/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/resources')
-rw-r--r--src/common/resources/resourcemanager.cpp6
-rw-r--r--src/common/resources/resourcemanager.h1
-rw-r--r--src/common/resources/sndfile.cpp11
3 files changed, 5 insertions, 13 deletions
diff --git a/src/common/resources/resourcemanager.cpp b/src/common/resources/resourcemanager.cpp
index be5baa8..8119a6b 100644
--- a/src/common/resources/resourcemanager.cpp
+++ b/src/common/resources/resourcemanager.cpp
@@ -86,12 +86,6 @@ bool CResourceManager::SetSaveLocation(const std::string &location)
}
-std::string CResourceManager::GetLanguageLocation()
-{
- return COLOBOT_I18N_DIR;
-}
-
-
SDL_RWops* CResourceManager::GetSDLFileHandler(const std::string &filename)
{
SDL_RWops *handler = SDL_AllocRW();
diff --git a/src/common/resources/resourcemanager.h b/src/common/resources/resourcemanager.h
index 36f6fa5..4052047 100644
--- a/src/common/resources/resourcemanager.h
+++ b/src/common/resources/resourcemanager.h
@@ -30,7 +30,6 @@ public:
static bool AddLocation(const std::string &location, bool prepend = true);
static bool RemoveLocation(const std::string &location);
static bool SetSaveLocation(const std::string &location);
- static std::string GetLanguageLocation();
static SDL_RWops* GetSDLFileHandler(const std::string &filename);
static CSNDFile* GetSNDFileHandler(const std::string &filename);
static bool Exists(const std::string &filename);
diff --git a/src/common/resources/sndfile.cpp b/src/common/resources/sndfile.cpp
index 9e8e729..3f5a60d 100644
--- a/src/common/resources/sndfile.cpp
+++ b/src/common/resources/sndfile.cpp
@@ -52,18 +52,17 @@ CSNDFile::~CSNDFile()
if (m_file)
{
PHYSFS_close(m_file);
- }
-
- if (m_snd_file)
- {
- sf_close(m_snd_file);
+ if (m_snd_file)
+ {
+ sf_close(m_snd_file);
+ }
}
}
bool CSNDFile::IsOpen()
{
- return m_snd_file;
+ return m_file && m_snd_file;
}