Author: wyoung
Date: Wed Nov 28 05:08:44 2007
New Revision: 1903
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1903&view=rev
Log:
More constness tweaks inline with previous
Modified:
trunk/lib/result.h
Modified: trunk/lib/result.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/result.h?rev=1903&r1=1902&r2=1903&view=diff
==============================================================================
--- trunk/lib/result.h (original)
+++ trunk/lib/result.h Wed Nov 28 05:08:44 2007
@@ -103,8 +103,11 @@
}
}
MYSQL_ROW row = fetch_raw_row();
- unsigned long* length = fetch_lengths();
- if (!row || !length) {
+ const unsigned long* lengths = fetch_lengths();
+ if (row && lengths) {
+ return Row(row, this, lengths, throw_exceptions());
+ }
+ else {
if (throw_exceptions()) {
throw EndOfResults();
}
@@ -112,7 +115,6 @@
return Row();
}
}
- return Row(row, this, length, throw_exceptions());
}
/// \brief Wraps mysql_fetch_row() in MySQL C API.
@@ -124,7 +126,7 @@
MYSQL_ROW fetch_raw_row() const { return mysql_fetch_row(result_); }
/// \brief Wraps mysql_fetch_lengths() in MySQL C API.
- unsigned long* fetch_lengths() const
+ const unsigned long* fetch_lengths() const
{ return mysql_fetch_lengths(result_); }
/// \brief Wraps mysql_fetch_field() in MySQL C API.
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits