I saw this optimization opportunity while reading over the diffs of the
latest version. Just a pass-by-reference change.
- Chris
diff -u software/mysql++/lib/connection.h:1.5 software/mysql++/lib/connection.h:1.6
--- software/mysql++/lib/connection.h:1.5 Thu Mar 3 23:44:20 2005
+++ software/mysql++/lib/connection.h Fri Mar 4 01:44:05 2005
@@ -158,7 +158,7 @@
{
return !execute("DROP DATABASE " + db);
}
- bool select_db(std::string db) { return select_db(db.c_str()); }
+ bool select_db(const std::string &db) { return select_db(db.c_str()); }
bool select_db(const char *db);
bool reload();
bool shutdown();