#endif
}
-bool RealDiskInterface::WriteFile(const string & path, const string & contents) {
+bool RealDiskInterface::WriteFile(const string& path, const string& contents) {
FILE * fp = fopen(path.c_str(), "w");
if (fp == NULL) {
Error("WriteFile(%s): Unable to create file. %s", path.c_str(), strerror(errno));
/// Create a file, with the specified name and contents
/// Returns true on success, false on failure
- virtual bool WriteFile(const string & path, const string & contents) = 0;
+ virtual bool WriteFile(const string& path, const string& contents) = 0;
/// Read a file to a string. Fill in |err| on error.
virtual string ReadFile(const string& path, string* err) = 0;
virtual ~RealDiskInterface() {}
virtual TimeStamp Stat(const string& path);
virtual bool MakeDir(const string& path);
- virtual bool WriteFile(const string & path, const string & contents);
+ virtual bool WriteFile(const string& path, const string& contents);
virtual string ReadFile(const string& path, string* err);
virtual int RemoveFile(const string& path);
};
public DiskInterface {
// DiskInterface implementation.
virtual TimeStamp Stat(const string& path);
- virtual bool WriteFile(const string& path, const string & contents) {
+ virtual bool WriteFile(const string& path, const string& contents) {
assert(false);
return true;
}
return FALSE;
}
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const string& command) {
Subprocess *subprocess = new Subprocess;
if (!subprocess->Start(this, command)) {
delete subprocess;
Fatal("sigprocmask: %s", strerror(errno));
}
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const string& command) {
Subprocess *subprocess = new Subprocess;
if (!subprocess->Start(this, command)) {
delete subprocess;
SubprocessSet();
~SubprocessSet();
- Subprocess *Add(const string &command);
+ Subprocess* Add(const string& command);
bool DoWork();
Subprocess* NextFinished();
void Clear();