From f39f0c0aec3ecae02a89d47be6bbb85632ca57f3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 May 2015 10:16:34 -0400 Subject: cmMakefile: Initialize SuppressWatches member before use In commit 86f3cd0f (cmMakefile: Require the localGenerator in the constructor, 2015-04-27) we added use of GetDefinition to the Initialize method. Set SuppressWatches before calling this method since GetDefinition checks it. --- Source/cmMakefile.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 0935383..1f406d3 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -83,6 +83,9 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator) this->WarnUnused = false; this->CheckSystemVars = false; + this->GeneratingBuildSystem = false; + this->SuppressWatches = false; + // Setup the default include file regular expression (match everything). this->IncludeFileRegularExpression = "^.*$"; // Setup the default include complaint regular expression (match nothing). @@ -117,10 +120,8 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator) this->LocalGenerator = localGenerator; this->AddDefaultDefinitions(); - this->Initialize(); - this->GeneratingBuildSystem = false; - this->SuppressWatches = false; + this->Initialize(); } //---------------------------------------------------------------------------- -- cgit v0.12 From 42142d4fd2455f3c792283ba9c261c3756a10d8a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 4 May 2015 10:18:50 -0400 Subject: cmMakefile: Inline Intialize method in constructor Since commit 80909041 (cmMakefile: Disable copy constructor, 2015-04-18) the only call to cmMakefile::Initialize is in one constructor. Inline it and drop the separate method. --- Source/cmMakefile.cxx | 6 ------ Source/cmMakefile.h | 1 - 2 files changed, 7 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1f406d3..d7bb5d9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -121,12 +121,6 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator) this->AddDefaultDefinitions(); - this->Initialize(); -} - -//---------------------------------------------------------------------------- -void cmMakefile::Initialize() -{ this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)"); this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)"); this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)"); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8968e81..f18f114 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -918,7 +918,6 @@ protected: private: cmMakefile(const cmMakefile& mf); cmMakefile& operator=(const cmMakefile& mf); - void Initialize(); cmState::Snapshot StateSnapshot; -- cgit v0.12