Merge pull request #332 from addtheice/range_based_for_prepared

modified mysql results/row to be ready for range based for
This commit is contained in:
Alex
2015-01-22 16:50:52 -08:00
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -30,6 +30,12 @@ MySQLRequestRow& MySQLRequestRow::operator=(MySQLRequestRow& moveItem)
return *this; return *this;
} }
MySQLRequestRow MySQLRequestRow::operator*()
{
return *this;
}
MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result) MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result)
: m_Result(result) : m_Result(result)
{ {
+1 -1
View File
@@ -28,7 +28,7 @@ public:
MySQLRequestRow operator++(int); MySQLRequestRow operator++(int);
bool operator==(const MySQLRequestRow& rhs); bool operator==(const MySQLRequestRow& rhs);
bool operator!=(const MySQLRequestRow& rhs); bool operator!=(const MySQLRequestRow& rhs);
MySQLRequestRow operator*();
char* operator[](int index); char* operator[](int index);
}; };