Author: wyoung
Date: Tue Dec 10 21:07:39 2013
New Revision: 2753
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2753&view=rev
Log:
Fixed resetdb's first output message when you run it without arguments.
It was giving a misleading message that could confuse someone.
Modified:
trunk/examples/resetdb.cpp
Modified: trunk/examples/resetdb.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/resetdb.cpp?rev=2753&r1=2752&r2=2753&view=diff
==============================================================================
--- trunk/examples/resetdb.cpp (original)
+++ trunk/examples/resetdb.cpp Tue Dec 10 21:07:39 2013
@@ -86,9 +86,9 @@
cout << "Connecting to database server..." << endl;
}
else {
- cout << "Connecting to '" <<
- (cmdline.user() || "USERNAME") << "'@'"
<<
- (cmdline.server() || "localhost") <<
"', with" <<
+ const char* u = cmdline.user() ? cmdline.user() : "";
+ const char* s = cmdline.server() ? cmdline.server() :
"localhost";
+ cout << "Connecting to '" << u << "'@'" << s << "',
with" <<
(cmdline.pass() && cmdline.pass()[0] ?
"" : "out") <<
" password..." << endl;
}
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits