[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1104-g6692827
Stephen Kelly
steveire at gmail.com
Tue Nov 27 18:12:37 EST 2012
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 6692827ddf62611acf96feb896c3a8ac00f5c7a8 (commit)
via 576c22667017ae30d0616c78de9ab967bf3f03a5 (commit)
from 8d8915423b84b6715829cc8725b9b1fece63a729 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6692827ddf62611acf96feb896c3a8ac00f5c7a8
commit 6692827ddf62611acf96feb896c3a8ac00f5c7a8
Merge: 8d89154 576c226
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Nov 27 18:12:35 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 27 18:12:35 2012 -0500
Merge topic 'tll-set-include-and-defines-requirements' into next
576c226 Don't clear the pointer vector without first deleting the entries.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=576c22667017ae30d0616c78de9ab967bf3f03a5
commit 576c22667017ae30d0616c78de9ab967bf3f03a5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Nov 28 00:06:59 2012 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Nov 28 00:11:05 2012 +0100
Don't clear the pointer vector without first deleting the entries.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 77571e8..3a22d73 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2483,6 +2483,20 @@ void cmTarget::GatherDependencies( const cmMakefile& mf,
}
//----------------------------------------------------------------------------
+void deleteAndClear(
+ std::vector<cmTargetInternals::IncludeDirectoriesEntry*> &entries)
+{
+ for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
+ it = entries.begin(),
+ end = entries.end();
+ it != end; ++it)
+ {
+ delete *it;
+ }
+ entries.clear();
+}
+
+//----------------------------------------------------------------------------
void cmTarget::SetProperty(const char* prop, const char* value)
{
if (!prop)
@@ -2494,7 +2508,7 @@ void cmTarget::SetProperty(const char* prop, const char* value)
{
cmListFileBacktrace lfbt;
cmGeneratorExpression ge(lfbt);
- this->Internal->IncludeDirectoriesEntries.clear();
+ deleteAndClear(this->Internal->IncludeDirectoriesEntries);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
this->Internal->IncludeDirectoriesEntries.push_back(
new cmTargetInternals::IncludeDirectoriesEntry(cge));
@@ -5255,13 +5269,7 @@ cmTargetInternalPointer
//----------------------------------------------------------------------------
cmTargetInternalPointer::~cmTargetInternalPointer()
{
- for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
- it = this->Pointer->IncludeDirectoriesEntries.begin(),
- end = this->Pointer->IncludeDirectoriesEntries.end();
- it != end; ++it)
- {
- delete *it;
- }
+ deleteAndClear(this->Pointer->IncludeDirectoriesEntries);
delete this->Pointer;
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmTarget.cxx | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list