diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2018-07-05 13:01:55 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2018-07-05 13:01:55 +0000 |
commit | b42e60c89980b9893f29ba5f15661f46d5b96628 (patch) | |
tree | 042dcf6ff69d062f553c86c281c2364b5e700680 /games/supertux | |
parent | aed252ca6d48ef7ec53b75320b4be0487b02be6e (diff) | |
download | ports-b42e60c89980b9893f29ba5f15661f46d5b96628.tar.gz ports-b42e60c89980b9893f29ba5f15661f46d5b96628.zip |
Notes
Diffstat (limited to 'games/supertux')
-rw-r--r-- | games/supertux/files/patch-src_music__manager.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/games/supertux/files/patch-src_music__manager.cpp b/games/supertux/files/patch-src_music__manager.cpp new file mode 100644 index 000000000000..f9a312c15f28 --- /dev/null +++ b/games/supertux/files/patch-src_music__manager.cpp @@ -0,0 +1,16 @@ +Fix build with Clang6. + +file is a const std::string&, which needs to be (explicitly) copied +into the pair when the pair's first member is std::string (non-const). + +--- src/music_manager.cpp.orig 2018-07-05 12:45:32 UTC ++++ src/music_manager.cpp +@@ -66,7 +66,7 @@ MusicManager::exists_music(const std::string& file) + // insert into music list + std::pair<std::map<std::string, MusicResource>::iterator, bool> result = + musics.insert( +- std::make_pair<std::string, MusicResource> (file, MusicResource())); ++ std::make_pair<std::string, MusicResource> (std::string(file), MusicResource())); + MusicResource& resource = result.first->second; + resource.manager = this; + resource.music = song; |