summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/SQL.h4
-rw-r--r--lib/SQL.cc6
2 files changed, 5 insertions, 5 deletions
diff --git a/include/SQL.h b/include/SQL.h
index 4d794d5..120d022 100644
--- a/include/SQL.h
+++ b/include/SQL.h
@@ -9,9 +9,9 @@ typedef std::map<String, String> AssocArray;
class SQLConnection : public Base {
public:
- SQLConnection(String host, String user, String passwd, String db, int port = 3306, String socket = "", unsigned long clags = 0) throw (GeneralException);
+ SQLConnection(const String & host, const String & user, const String & passwd, const String & db, int port = 3306, const String & socket = "", unsigned long clags = 0) throw (GeneralException);
~SQLConnection();
- int query(String);
+ int query(const String &);
int numrows();
int numfields();
AssocArray fetchrow();
diff --git a/lib/SQL.cc b/lib/SQL.cc
index 7667cfb..35b005d 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -6,8 +6,8 @@
#include "SQL.h"
-SQLConnection::SQLConnection(String host, String user, String passwd,
- String db, int port, String socket,
+SQLConnection::SQLConnection(const String & host, const String & user, const String & passwd,
+ const String & db, int port, const String & socket,
unsigned long cflags) throw (GeneralException) : res(0) {
mysql_init(&con);
@@ -29,7 +29,7 @@ SQLConnection::~SQLConnection() {
mysql_close(&con);
}
-int SQLConnection::query(String q) {
+int SQLConnection::query(const String & q) {
int r;
if (res) {