summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackLog.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-03-02 09:41:17 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-03-08 15:32:44 (GMT)
commit44867a8c013a2ae6b828ef12af8e81cb73795483 (patch)
treec81f902ed5de798ea88a6c4e5bd1f7d57c1936ee /Source/CPack/cmCPackLog.h
parent1bb7474abac4eb3aa7dd1b52d9d09d2205e104f3 (diff)
downloadCMake-44867a8c013a2ae6b828ef12af8e81cb73795483.zip
CMake-44867a8c013a2ae6b828ef12af8e81cb73795483.tar.gz
CMake-44867a8c013a2ae6b828ef12af8e81cb73795483.tar.bz2
Modernize memory management
Update internals of various classes.
Diffstat (limited to 'Source/CPack/cmCPackLog.h')
-rw-r--r--Source/CPack/cmCPackLog.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h
index 1cb1643..68ffcce 100644
--- a/Source/CPack/cmCPackLog.h
+++ b/Source/CPack/cmCPackLog.h
@@ -5,6 +5,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <memory>
#include <ostream>
#include <string>
@@ -97,13 +98,13 @@ public:
void SetErrorPrefix(std::string const& pfx) { this->ErrorPrefix = pfx; }
private:
- bool Verbose;
- bool Debug;
- bool Quiet;
+ bool Verbose = false;
+ bool Debug = false;
+ bool Quiet = false;
- bool NewLine;
+ bool NewLine = true;
- int LastTag;
+ int LastTag = cmCPackLog::NOTAG;
std::string Prefix;
std::string OutputPrefix;
@@ -112,13 +113,11 @@ private:
std::string WarningPrefix;
std::string ErrorPrefix;
- std::ostream* DefaultOutput;
- std::ostream* DefaultError;
+ std::ostream* DefaultOutput = nullptr;
+ std::ostream* DefaultError = nullptr;
- std::string LogOutputFileName;
- std::ostream* LogOutput;
- // Do we need to cleanup log output stream
- bool LogOutputCleanup;
+ std::ostream* LogOutput = nullptr;
+ std::unique_ptr<std::ostream> LogOutputStream;
};
class cmCPackLogWrite