aboutsummaryrefslogtreecommitdiffstats
path: root/games/supertux
diff options
context:
space:
mode:
authoradridg <adridg@FreeBSD.org>2018-07-05 21:01:55 +0800
committeradridg <adridg@FreeBSD.org>2018-07-05 21:01:55 +0800
commitb39df8c729cebeb05fbd73a03e5c66738073abbc (patch)
tree042dcf6ff69d062f553c86c281c2364b5e700680 /games/supertux
parent0d78d85aa0517a0c48f3da225830ba6b04c0488d (diff)
downloadfreebsd-ports-gnome-b39df8c729cebeb05fbd73a03e5c66738073abbc.tar.gz
freebsd-ports-gnome-b39df8c729cebeb05fbd73a03e5c66738073abbc.tar.zst
freebsd-ports-gnome-b39df8c729cebeb05fbd73a03e5c66738073abbc.zip
Fix build with Clang6
/usr/include/c++/v1/utility:639:1: note: candidate function not viable: 1st argument ('const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >')) would lose const qualifier make_pair(_T1&& __t1, _T2&& __t2) Patch includes more explanation. Reported by: linimon
Diffstat (limited to 'games/supertux')
-rw-r--r--games/supertux/files/patch-src_music__manager.cpp16
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;