summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-23 10:21:46 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-23 16:52:33 (GMT)
commit3b2b02825d88a045d08b8295927652cbcff408a8 (patch)
tree576d53beef55b9da82fe7e22187efb023c12d59d /Source/CPack
parent19612dffd27d90d73e3b7cff9cbba241294c17e9 (diff)
downloadCMake-3b2b02825d88a045d08b8295927652cbcff408a8.zip
CMake-3b2b02825d88a045d08b8295927652cbcff408a8.tar.gz
CMake-3b2b02825d88a045d08b8295927652cbcff408a8.tar.bz2
Source sweep: Replace std::ostringstream when used with a single append
This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackBundleGenerator.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx
index f58cc0a..fb3f22f 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -89,11 +89,10 @@ int cmCPackBundleGenerator::ConstructBundle()
// The staging directory contains everything that will end-up inside the
// final disk image ...
- std::ostringstream staging;
- staging << toplevel;
+ std::string const staging = toplevel;
std::ostringstream contents;
- contents << staging.str() << "/" << cpack_bundle_name << ".app/"
+ contents << staging << "/" << cpack_bundle_name << ".app/"
<< "Contents";
std::ostringstream application;