summaryrefslogtreecommitdiff
path: root/src/soundmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-03 02:12:42 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-03 18:44:58 +0300
commit9e72886ee15acc39cbb6075ce32a60a5391ea9f3 (patch)
treefd7d0b05eeaed5ab0016cad58772cab7456f36b4 /src/soundmanager.cpp
parent49631972db5b965413d4bbe36983a8d5bd203183 (diff)
downloadmanaplus-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.gz
manaplus-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.bz2
manaplus-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.xz
manaplus-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.zip
Replace string::append with pathJoin.
Diffstat (limited to 'src/soundmanager.cpp')
-rw-r--r--src/soundmanager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index ba455f65f..7d085fff4 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -325,7 +325,8 @@ void SoundManager::setSfxVolume(const int volume)
static SDLMusic *loadMusic(const std::string &fileName,
const SkipError skipError)
{
- const std::string path = paths.getStringValue("music").append(fileName);
+ const std::string path = pathJoin(paths.getStringValue("music"),
+ fileName);
if (!VirtFs::exists(path))
{
if (skipError == SkipError_false)
@@ -460,7 +461,7 @@ void SoundManager::playSfx(const std::string &path,
}
else
{
- tmpPath = paths.getValue("sfx", "sfx/").append(path);
+ tmpPath = pathJoin(paths.getValue("sfx", "sfx"), path);
}
SoundEffect *const sample = Loader::getSoundEffect(tmpPath);
if (sample)
@@ -493,8 +494,8 @@ void SoundManager::playGuiSound(const std::string &name)
const std::string sound = config.getStringValue(name);
if (sound == "(no sound)")
return;
- playGuiSfx(branding.getStringValue("systemsounds").append(
- sound).append(".ogg"));
+ playGuiSfx(pathJoin(branding.getStringValue("systemsounds"),
+ std::string(sound).append(".ogg")));
}
void SoundManager::playGuiSfx(const std::string &path)
@@ -510,7 +511,7 @@ void SoundManager::playGuiSfx(const std::string &path)
if (!path.compare(0, 4, "sfx/"))
tmpPath = path;
else
- tmpPath = paths.getValue("sfx", "sfx/").append(path);
+ tmpPath = pathJoin(paths.getValue("sfx", "sfx"), path);
SoundEffect *const sample = Loader::getSoundEffect(tmpPath);
if (sample)
{