Make Cleaner::config_ a reference-to-const instead of copying the value.
authorThiago Farina <tfarina@chromium.org>
Fri, 9 Sep 2011 17:26:59 +0000 (14:26 -0300)
committerThiago Farina <tfarina@chromium.org>
Fri, 9 Sep 2011 17:26:59 +0000 (14:26 -0300)
Signed-off-by: Thiago Farina <tfarina@chromium.org>
src/clean.cc
src/clean.h

index 16ca5e5..d22ac59 100644 (file)
@@ -20,7 +20,6 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include "build.h"
 #include "disk_interface.h"
 #include "graph.h"
 #include "state.h"
index 9961658..ab606f4 100644 (file)
 
 #ifndef NINJA_CLEAN_H_
 #define NINJA_CLEAN_H_
+#pragma once
+
+#include <set>
+#include <string>
 
 #include "build.h"
 
-#include <string>
-#include <set>
 using namespace std;
 
 struct State;
-struct BuildConfig;
 struct Node;
 struct Rule;
 struct DiskInterface;
@@ -92,7 +93,7 @@ class Cleaner {
   void Reset();
 
   State* state_;
-  BuildConfig config_;
+  const BuildConfig& config_;
   set<string> removed_;
   int cleaned_files_count_;
   DiskInterface* disk_interface_;