Browse Source

cmMakefile: Make cmListFileBacktrace default constructible.

Stephen Kelly 10 years ago
parent
commit
52919ac8ac

+ 2 - 2
Source/cmCustomCommand.cxx

@@ -17,7 +17,7 @@
 
 //----------------------------------------------------------------------------
 cmCustomCommand::cmCustomCommand()
-  : Backtrace(NULL)
+  : Backtrace()
 {
   this->HaveComment = false;
   this->EscapeOldStyle = true;
@@ -82,7 +82,7 @@ cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
   WorkingDirectory(workingDirectory?workingDirectory:""),
   EscapeAllowMakeVars(false),
   EscapeOldStyle(true),
-  Backtrace(NULL)
+  Backtrace()
 {
   this->EscapeOldStyle = true;
   this->EscapeAllowMakeVars = false;

+ 1 - 1
Source/cmExportBuildFileGenerator.cxx

@@ -18,7 +18,7 @@
 
 //----------------------------------------------------------------------------
 cmExportBuildFileGenerator::cmExportBuildFileGenerator()
-  : Backtrace(NULL)
+  : Backtrace()
 {
   this->Makefile = 0;
   this->ExportSet = 0;

+ 1 - 1
Source/cmGeneratorExpression.cxx

@@ -34,7 +34,7 @@ cmGeneratorExpression::Parse(std::string const& input)
 {
   return cmsys::auto_ptr<cmCompiledGeneratorExpression>(
     new cmCompiledGeneratorExpression(
-      this->Backtrace ? *this->Backtrace : cmListFileBacktrace(NULL),
+      this->Backtrace ? *this->Backtrace : cmListFileBacktrace(),
       input));
 }
 

+ 1 - 1
Source/cmGeneratorExpressionDAGChecker.cxx

@@ -35,7 +35,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
                 const GeneratorExpressionContent *content,
                 cmGeneratorExpressionDAGChecker *parent)
   : Parent(parent), Target(target), Property(property),
-    Content(content), Backtrace(NULL), TransitivePropertiesOnly(false)
+    Content(content), Backtrace(), TransitivePropertiesOnly(false)
 {
   Initialize();
 }

+ 1 - 1
Source/cmListFileCache.h

@@ -74,7 +74,7 @@ struct cmListFileFunction: public cmListFileContext
 class cmListFileBacktrace: private std::vector<cmListFileContext>
 {
   public:
-    cmListFileBacktrace(cmLocalGenerator* localGen)
+    cmListFileBacktrace(cmLocalGenerator* localGen = 0)
       : LocalGenerator(localGen)
       , Relative(localGen ? false : true)
     {

+ 2 - 2
Source/cmTarget.cxx

@@ -94,13 +94,13 @@ class cmTargetInternals
 {
 public:
   cmTargetInternals()
-    : Backtrace(NULL)
+    : Backtrace()
     {
     this->PolicyWarnedCMP0022 = false;
     this->UtilityItemsDone = false;
     }
   cmTargetInternals(cmTargetInternals const&)
-    : Backtrace(NULL)
+    : Backtrace()
     {
     this->PolicyWarnedCMP0022 = false;
     this->UtilityItemsDone = false;

+ 1 - 1
Source/cmTarget.h

@@ -66,7 +66,7 @@ public:
 class cmLinkImplItem: public cmLinkItem
 {
 public:
-  cmLinkImplItem(): cmLinkItem(), Backtrace(0), FromGenex(false) {}
+  cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {}
   cmLinkImplItem(std::string const& n,
                  cmTarget const* t,
                  cmListFileBacktrace const& bt,

+ 1 - 1
Source/cmake.h

@@ -301,7 +301,7 @@ class cmake
 
   /** Display a message to the user.  */
   void IssueMessage(cmake::MessageType t, std::string const& text,
-        cmListFileBacktrace const& backtrace = cmListFileBacktrace(NULL));
+        cmListFileBacktrace const& backtrace = cmListFileBacktrace());
   void IssueMessage(cmake::MessageType t, std::string const& text,
         cmListFileContext const& lfc);