Author: wyoung
Date: Tue Feb 12 01:42:19 2008
New Revision: 2175

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2175&view=rev
Log:
Signedness tweaks

Modified:
    trunk/examples/cpool.cpp

Modified: trunk/examples/cpool.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/cpool.cpp?rev=2175&r1=2174&r2=2175&view=diff
==============================================================================
--- trunk/examples/cpool.cpp (original)
+++ trunk/examples/cpool.cpp Tue Feb 12 01:42:19 2008
@@ -103,7 +103,7 @@
 {
        // Pull data from the sample table a bunch of times, releasing the
        // connection we use each time.
-       for (int i = 0; i < 6; ++i) {
+       for (size_t i = 0; i < 6; ++i) {
                // Go get a free connection from the pool, or create a new one
                // if there are no free conns yet.
                mysqlpp::Connection* cp = poolptr->grab();
@@ -116,7 +116,7 @@
                // each row in the result set.
                mysqlpp::Query query(cp->query("select * from stock"));
                mysqlpp::StoreQueryResult res = query.store();
-               for (int j = 0; j < res.num_rows(); ++j) {
+               for (size_t j = 0; j < res.num_rows(); ++j) {
                        cout.put('.');
                }
 
@@ -178,8 +178,8 @@
        bool running[] = {
                        true, true, true, true, true, true, true,
                        true, true, true, true, true, true, true };
-       const int num_threads = sizeof(running) / sizeof(running[0]);
-       int i;
+       const size_t num_threads = sizeof(running) / sizeof(running[0]);
+       size_t i;
        for (i = 0; i < num_threads; ++i) {
                if (int err = create_thread(worker_thread, running + i)) {
                        cerr << "Failed to create thread " << i <<


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to