Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2018 13:01:56 +0000 (UTC)
From:      Adriaan de Groot <adridg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r473967 - head/games/supertux/files
Message-ID:  <201807051301.w65D1u1A035213@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adridg
Date: Thu Jul  5 13:01:55 2018
New Revision: 473967
URL: https://svnweb.freebsd.org/changeset/ports/473967

Log:
  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

Added:
  head/games/supertux/files/
  head/games/supertux/files/patch-src_music__manager.cpp   (contents, props changed)

Added: head/games/supertux/files/patch-src_music__manager.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/supertux/files/patch-src_music__manager.cpp	Thu Jul  5 13:01:55 2018	(r473967)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807051301.w65D1u1A035213>