summaryrefslogtreecommitdiffstats
path: root/src/disk_interface.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-06-19 23:00:35 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-06-19 23:00:35 (GMT)
commite88a8daa10bb27a0617c74f3bc6eec66823f3a99 (patch)
treeaa93589817d8552164f5a00edc89705b64b45745 /src/disk_interface.h
parentfcca327e0c66dfec49af28f09f94b94ac49c5cb4 (diff)
downloadNinja-e88a8daa10bb27a0617c74f3bc6eec66823f3a99.zip
Ninja-e88a8daa10bb27a0617c74f3bc6eec66823f3a99.tar.gz
Ninja-e88a8daa10bb27a0617c74f3bc6eec66823f3a99.tar.bz2
make Stat() a const method
Diffstat (limited to 'src/disk_interface.h')
-rw-r--r--src/disk_interface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/disk_interface.h b/src/disk_interface.h
index b152a62..a13bced 100644
--- a/src/disk_interface.h
+++ b/src/disk_interface.h
@@ -30,7 +30,7 @@ struct DiskInterface {
/// stat() a file, returning the mtime, or 0 if missing and -1 on
/// other errors.
- virtual TimeStamp Stat(const string& path) = 0;
+ virtual TimeStamp Stat(const string& path) const = 0;
/// Create a directory, returning false on failure.
virtual bool MakeDir(const string& path) = 0;
@@ -62,7 +62,7 @@ struct RealDiskInterface : public DiskInterface {
#endif
{}
virtual ~RealDiskInterface() {}
- virtual TimeStamp Stat(const string& path);
+ virtual TimeStamp Stat(const string& path) const;
virtual bool MakeDir(const string& path);
virtual bool WriteFile(const string& path, const string& contents);
virtual string ReadFile(const string& path, string* err);
@@ -83,7 +83,7 @@ struct RealDiskInterface : public DiskInterface {
// TODO: Neither a map nor a hashmap seems ideal here. If the statcache
// works out, come up with a better data structure.
typedef map<string, DirCache> Cache;
- Cache cache_;
+ mutable Cache cache_;
#endif
};