[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3751: A couple more const-correctness tweaks. (vidalia/trunk/src/common)



Author: edmanm
Date: 2009-04-30 23:26:38 -0400 (Thu, 30 Apr 2009)
New Revision: 3751

Modified:
   vidalia/trunk/src/common/procutil.cpp
   vidalia/trunk/src/common/procutil.h
Log:

A couple more const-correctness tweaks.


Modified: vidalia/trunk/src/common/procutil.cpp
===================================================================
--- vidalia/trunk/src/common/procutil.cpp	2009-05-01 03:13:19 UTC (rev 3750)
+++ vidalia/trunk/src/common/procutil.cpp	2009-05-01 03:26:38 UTC (rev 3751)
@@ -59,7 +59,7 @@
 
 /** Writes the given file to disk containing the current process's PID. */
 bool
-write_pidfile(QString pidFileName, QString *errmsg)
+write_pidfile(const QString &pidFileName, QString *errmsg)
 {
   /* Make sure the directory exists */
   QDir pidFileDir = QFileInfo(pidFileName).absoluteDir();
@@ -82,7 +82,7 @@
 /** Reads the given pidfile and returns the value contained in it. If the file
  * does not exist 0 is returned. Returns -1 if an error occurs. */
 qint64 
-read_pidfile(QString pidFileName, QString *errmsg)
+read_pidfile(const QString &pidFileName, QString *errmsg)
 {
   qint64 pid;
   

Modified: vidalia/trunk/src/common/procutil.h
===================================================================
--- vidalia/trunk/src/common/procutil.h	2009-05-01 03:13:19 UTC (rev 3750)
+++ vidalia/trunk/src/common/procutil.h	2009-05-01 03:26:38 UTC (rev 3751)
@@ -38,11 +38,11 @@
 bool is_process_running(qint64 pid);
 
 /** Writes the given file to disk containing the current process's PID. */
-bool write_pidfile(QString pidfile, QString *errmsg = 0);
+bool write_pidfile(const QString &pidfile, QString *errmsg = 0);
 
 /** Reads the giiven pidfile and returns the value in it. If the file does not
  * exist, -1 is returned. */
-qint64 read_pidfile(QString pidfile, QString *errmsg = 0);
+qint64 read_pidfile(const QString &pidfile, QString *errmsg = 0);
 
 /** Return a list of all currently running PIDs and their associated process
  * names. */