diff options
author | Michael Jones <jonesmz@jonesmz.com> | 2018-04-06 01:13:04 (GMT) |
---|---|---|
committer | Michael Jones <jonesmz@jonesmz.com> | 2020-09-30 21:19:11 (GMT) |
commit | a5aae85a3c8a4032ab18b82afe6c77673125d888 (patch) | |
tree | 0a2a857d7c717d15d4d1cf04b3cab414b9e52f21 /src/deps_log.h | |
parent | ff4f2a0db21b738bba743ad543d8553417aca7b0 (diff) | |
download | Ninja-a5aae85a3c8a4032ab18b82afe6c77673125d888.zip Ninja-a5aae85a3c8a4032ab18b82afe6c77673125d888.tar.gz Ninja-a5aae85a3c8a4032ab18b82afe6c77673125d888.tar.bz2 |
Remove 'using namespace std' from header files, properly namespace all std symbols
Diffstat (limited to 'src/deps_log.h')
-rw-r--r-- | src/deps_log.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/deps_log.h b/src/deps_log.h index c4ada8b..cc44b41 100644 --- a/src/deps_log.h +++ b/src/deps_log.h @@ -17,7 +17,6 @@ #include <string> #include <vector> -using namespace std; #include <stdio.h> @@ -71,8 +70,8 @@ struct DepsLog { ~DepsLog(); // Writing (build-time) interface. - bool OpenForWrite(const string& path, string* err); - bool RecordDeps(Node* node, TimeStamp mtime, const vector<Node*>& nodes); + bool OpenForWrite(const std::string& path, std::string* err); + bool RecordDeps(Node* node, TimeStamp mtime, const std::vector<Node*>& nodes); bool RecordDeps(Node* node, TimeStamp mtime, int node_count, Node** nodes); void Close(); @@ -85,11 +84,11 @@ struct DepsLog { int node_count; Node** nodes; }; - LoadStatus Load(const string& path, State* state, string* err); + LoadStatus Load(const std::string& path, State* state, std::string* err); Deps* GetDeps(Node* node); /// Rewrite the known log entries, throwing away old data. - bool Recompact(const string& path, string* err); + bool Recompact(const std::string& path, std::string* err); /// Returns if the deps entry for a node is still reachable from the manifest. /// @@ -100,8 +99,8 @@ struct DepsLog { bool IsDepsEntryLiveFor(Node* node); /// Used for tests. - const vector<Node*>& nodes() const { return nodes_; } - const vector<Deps*>& deps() const { return deps_; } + const std::vector<Node*>& nodes() const { return nodes_; } + const std::vector<Deps*>& deps() const { return deps_; } private: // Updates the in-memory representation. Takes ownership of |deps|. @@ -119,9 +118,9 @@ struct DepsLog { std::string file_path_; /// Maps id -> Node. - vector<Node*> nodes_; + std::vector<Node*> nodes_; /// Maps id -> deps of that id. - vector<Deps*> deps_; + std::vector<Deps*> deps_; friend struct DepsLogTest; }; |