dbTalk Databases Forums  

[patch] minor optimization patch

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss [patch] minor optimization patch in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Frey
 
Posts: n/a

Default [patch] minor optimization patch - 03-04-2005 , 12:56 AM






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();


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: [patch] minor optimization patch - 03-05-2005 , 01:30 AM






Chris Frey wrote:

Quote:
I saw this optimization opportunity while reading over the diffs of the
latest version. Just a pass-by-reference change.
If it didn't change the ABI, I'd accept it. I don't see a compelling
reason to break the ABI here.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.