Put & operator with the type rather than the variable name.
authorThiago Farina <tfarina@chromium.org>
Sat, 28 Apr 2012 18:21:37 +0000 (15:21 -0300)
committerThiago Farina <tfarina@chromium.org>
Sat, 28 Apr 2012 18:24:57 +0000 (15:24 -0300)
Signed-off-by: Thiago Farina <tfarina@chromium.org>
src/disk_interface.cc
src/disk_interface.h
src/disk_interface_test.cc
src/subprocess-win32.cc
src/subprocess.cc
src/subprocess.h

index 5a36685..74f33c4 100644 (file)
@@ -103,7 +103,7 @@ TimeStamp RealDiskInterface::Stat(const string& path) {
 #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));
index c0f5ee5..55f8a21 100644 (file)
@@ -36,7 +36,7 @@ struct DiskInterface {
 
   /// 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;
@@ -58,7 +58,7 @@ struct RealDiskInterface : public DiskInterface {
   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);
 };
index 9e460c5..985e991 100644 (file)
@@ -107,7 +107,7 @@ struct StatTest : public StateTestWithBuiltinRules,
                   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;
   }
index fef0bc8..7842114 100644 (file)
@@ -207,7 +207,7 @@ BOOL WINAPI SubprocessSet::NotifyInterrupted(DWORD dwCtrlType) {
   return FALSE;
 }
 
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const stringcommand) {
   Subprocess *subprocess = new Subprocess;
   if (!subprocess->Start(this, command)) {
     delete subprocess;
index 25b1bda..0d240b1 100644 (file)
@@ -172,7 +172,7 @@ SubprocessSet::~SubprocessSet() {
     Fatal("sigprocmask: %s", strerror(errno));
 }
 
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const stringcommand) {
   Subprocess *subprocess = new Subprocess;
   if (!subprocess->Start(this, command)) {
     delete subprocess;
index 3294416..4c1629c 100644 (file)
@@ -75,7 +75,7 @@ struct SubprocessSet {
   SubprocessSet();
   ~SubprocessSet();
 
-  Subprocess *Add(const string &command);
+  Subprocess* Add(const string& command);
   bool DoWork();
   Subprocess* NextFinished();
   void Clear();