summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-31 12:11:01 +0000
committerKitware Robot <kwrobot@kitware.com>2017-10-31 08:11:13 -0400
commit31336538b845e5ec66234c0708dabd6e43fe10d9 (patch)
tree4b0558b32cd83556100c9586d13b78c8df1c1f35 /Source
parentfd2e6212a66cd443bbf3e5b6e2cfd77ef1fb7b61 (diff)
parent6a4a61d9e1017190f122219681c239b82cfe9390 (diff)
downloadcmake-31336538b845e5ec66234c0708dabd6e43fe10d9.tar.gz
Merge topic 'minifixes'
6a4a61d9 cmForEachCommand: prevent leakage 52680d80 cm_codecvt: cleanup superfluous semicolons Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1402
Diffstat (limited to 'Source')
-rw-r--r--Source/cmForEachCommand.cxx5
-rw-r--r--Source/cm_codecvt.cxx14
2 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 542a860258..df288bd682 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "cmAlgorithms.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
@@ -121,7 +122,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
}
// create a function blocker
- cmForEachFunctionBlocker* f = new cmForEachFunctionBlocker(this->Makefile);
+ auto f = cm::make_unique<cmForEachFunctionBlocker>(this->Makefile);
if (args.size() > 1) {
if (args[1] == "RANGE") {
int start = 0;
@@ -175,7 +176,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
} else {
f->Args = args;
}
- this->Makefile->AddFunctionBlocker(f);
+ this->Makefile->AddFunctionBlocker(f.release());
return true;
}
diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index cf55741a7c..6705851721 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -38,12 +38,14 @@ codecvt::codecvt(Encoding e)
}
}
-codecvt::~codecvt(){};
+codecvt::~codecvt()
+{
+}
bool codecvt::do_always_noconv() const throw()
{
return m_noconv;
-};
+}
std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from,
const char* from_end,
@@ -122,7 +124,7 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from,
static_cast<void>(to_next);
return std::codecvt_base::noconv;
#endif
-};
+}
std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to,
char* to_end,
@@ -143,7 +145,7 @@ std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to,
static_cast<void>(to_end);
return std::codecvt_base::ok;
#endif
-};
+}
#if defined(_WIN32)
std::codecvt_base::result codecvt::Decode(mbstate_t& state, int size,
@@ -235,9 +237,9 @@ void codecvt::BufferPartial(mbstate_t& state, int size,
int codecvt::do_max_length() const throw()
{
return 4;
-};
+}
int codecvt::do_encoding() const throw()
{
return 0;
-};
+}