summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/build_log.h5
-rw-r--r--src/build_log_test.cc4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/build_log.h b/src/build_log.h
index 040609d..da8e726 100644
--- a/src/build_log.h
+++ b/src/build_log.h
@@ -71,10 +71,11 @@ struct BuildLog {
/// Rewrite the known log entries, throwing away old data.
bool Recompact(const string& path, string* err);
- // TODO: make these private.
typedef ExternalStringHashMap<LogEntry*>::Type Log;
+ const Log& log() const { return log_; }
+
+ private:
Log log_;
-private:
FILE* log_file_;
BuildConfig* config_;
bool needs_recompaction_;
diff --git a/src/build_log_test.cc b/src/build_log_test.cc
index c6d6bc3..9b729c7 100644
--- a/src/build_log_test.cc
+++ b/src/build_log_test.cc
@@ -54,8 +54,8 @@ TEST_F(BuildLogTest, WriteRead) {
EXPECT_TRUE(log2.Load(kTestFilename, &err));
ASSERT_EQ("", err);
- ASSERT_EQ(2u, log1.log_.size());
- ASSERT_EQ(2u, log2.log_.size());
+ ASSERT_EQ(2u, log1.log().size());
+ ASSERT_EQ(2u, log2.log().size());
BuildLog::LogEntry* e1 = log1.LookupByOutput("out");
ASSERT_TRUE(e1);
BuildLog::LogEntry* e2 = log2.LookupByOutput("out");