summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/build_log.cc')
-rw-r--r--src/build_log.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 852a9d0..e3e96e5 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -35,11 +35,15 @@ namespace {
const char kFileSignature[] = "# ninja log v%d\n";
const int kCurrentVersion = 3;
-}
+} // namespace
BuildLog::BuildLog()
: log_file_(NULL), config_(NULL), needs_recompaction_(false) {}
+BuildLog::~BuildLog() {
+ Close();
+}
+
bool BuildLog::OpenForWrite(const string& path, string* err) {
if (config_ && config_->dry_run)
return true; // Do nothing, report success.
@@ -144,7 +148,7 @@ bool BuildLog::Load(const string& path, string* err) {
end_time = atoi(start);
start = end + 1;
}
-
+
if (log_version >= 3) {
// In v3 we log the restat mtime.
char* end = strchr(start, ' ');