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/build_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/build_log.h')
-rw-r--r-- | src/build_log.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/build_log.h b/src/build_log.h index 6d060d1..842c467 100644 --- a/src/build_log.h +++ b/src/build_log.h @@ -17,7 +17,6 @@ #include <string> #include <stdio.h> -using namespace std; #include "hash_map.h" #include "load_status.h" @@ -47,17 +46,17 @@ struct BuildLog { /// Prepares writing to the log file without actually opening it - that will /// happen when/if it's needed - bool OpenForWrite(const string& path, const BuildLogUser& user, string* err); + bool OpenForWrite(const std::string& path, const BuildLogUser& user, std::string* err); bool RecordCommand(Edge* edge, int start_time, int end_time, TimeStamp mtime = 0); void Close(); /// Load the on-disk log. - LoadStatus Load(const string& path, string* err); + LoadStatus Load(const std::string& path, std::string* err); struct LogEntry { - string output; + std::string output; uint64_t command_hash; int start_time; int end_time; @@ -72,19 +71,19 @@ struct BuildLog { mtime == o.mtime; } - explicit LogEntry(const string& output); - LogEntry(const string& output, uint64_t command_hash, + explicit LogEntry(const std::string& output); + LogEntry(const std::string& output, uint64_t command_hash, int start_time, int end_time, TimeStamp restat_mtime); }; /// Lookup a previously-run command by its output path. - LogEntry* LookupByOutput(const string& path); + LogEntry* LookupByOutput(const std::string& path); /// Serialize an entry into a log file. bool WriteEntry(FILE* f, const LogEntry& entry); /// Rewrite the known log entries, throwing away old data. - bool Recompact(const string& path, const BuildLogUser& user, string* err); + bool Recompact(const std::string& path, const BuildLogUser& user, std::string* err); /// Restat all outputs in the log bool Restat(StringPiece path, const DiskInterface& disk_interface, |