List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:March 4 2005 6:54am
Subject:[patch] minor optimization patch
View as plain text  
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();

Thread
[patch] minor optimization patchChris Frey4 Mar
  • Re: [patch] minor optimization patchWarren Young5 Mar