[Cmake-commits] CMake branch, next, updated. v3.7.1-1694-g0cfcc2e

Daniel Pfeifer daniel at pfeifer-mail.de
Sun Dec 11 03:14:46 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4 (commit)
       via  a6e932533da73b906508e42840c665b89955fb00 (commit)
      from  22492e41fbc949999575cf126d9f3bde083da9b8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4
commit 0cfcc2e3e5b7eb312b82ceddeabf1e696feea2d4
Merge: 22492e4 a6e9325
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Sun Dec 11 03:14:44 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Dec 11 03:14:44 2016 -0500

    Merge topic 'clang-tidy' into next
    
    a6e93253 fixup! clang-tidy: apply performance-unnecessary-value-param fixes


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6e932533da73b906508e42840c665b89955fb00
commit a6e932533da73b906508e42840c665b89955fb00
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Sun Dec 11 09:14:23 2016 +0100
Commit:     Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Sun Dec 11 09:14:23 2016 +0100

    fixup! clang-tidy: apply performance-unnecessary-value-param fixes

diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx
index e2ba58d..617e1ca 100644
--- a/Source/cmProcessOutput.cxx
+++ b/Source/cmProcessOutput.cxx
@@ -52,12 +52,16 @@ cmProcessOutput::~cmProcessOutput()
 {
 }
 
-bool cmProcessOutput::DecodeText(std::string const& raw, std::string& decoded,
+bool cmProcessOutput::DecodeText(std::string raw, std::string& decoded,
                                  size_t id)
 {
+#if !defined(_WIN32)
+  static_cast<void>(id);
+  decoded.swap(raw);
+  return true;
+#else
   bool success = true;
   decoded = raw;
-#if defined(_WIN32)
   if (id > 0) {
     if (rawparts.size() < id) {
       rawparts.reserve(id);
@@ -114,10 +118,8 @@ bool cmProcessOutput::DecodeText(std::string const& raw, std::string& decoded,
       success = DoDecodeText(raw, decoded, NULL);
     }
   }
-#else
-  static_cast<void>(id);
-#endif
   return success;
+#endif
 }
 
 bool cmProcessOutput::DecodeText(const char* data, size_t length,
diff --git a/Source/cmProcessOutput.h b/Source/cmProcessOutput.h
index 0ea8aa1..d2e631f 100644
--- a/Source/cmProcessOutput.h
+++ b/Source/cmProcessOutput.h
@@ -57,7 +57,7 @@ public:
    * keep incomplete characters in separate buffers for each stream.
    * \return true if successfully decoded \a raw to \a decoded or false if not.
    */
-  bool DecodeText(std::string const& raw, std::string& decoded, size_t id = 0);
+  bool DecodeText(std::string raw, std::string& decoded, size_t id = 0);
   /**
    * Decode \a data with \a length from external encoding to internal
    * encoding in \a decoded.

-----------------------------------------------------------------------

Summary of changes:
 Source/cmProcessOutput.cxx |   12 +++++++-----
 Source/cmProcessOutput.h   |    2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list