From 73405549cb122d30dfdba13414660a3427eb0db2 Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Fri, 21 Mar 2014 18:38:09 +0100 Subject: [PATCH] Avoids const_cast in configure_command by using mutable --- src/support/Package.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/support/Package.cpp b/src/support/Package.cpp index f5ee5d5436..b4b0e1493d 100644 --- a/src/support/Package.cpp +++ b/src/support/Package.cpp @@ -154,9 +154,8 @@ Package::Package(string const & command_line_arg0, std::string const & Package::configure_command() const { if (configure_command_.empty()) { - std::string &command = const_cast(configure_command_); FileName const configure_script(addName(system_support().absFileName(), "configure.py")); - command = os::python() + ' ' + + configure_command_ = os::python() + ' ' + quoteName(configure_script.toFilesystemEncoding()) + with_version_suffix() + " --binary-dir=" + quoteName(FileName(binary_dir().absFileName()).toFilesystemEncoding());