Use explicit types with get_row
Auto types aren't very neat as return values because they move the burden of knowledge to the reader. Using an explicit, and somewhat self-explanatory, type makes it easier to assess the code without knowing the implementation of the type.
This commit is contained in:
@ -525,9 +525,9 @@ int find_field(MYSQL* conn, const char* sql, const char* field_name, char* value
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::vector<std::string> get_row(MYSQL* conn, std::string sql)
|
||||
Row get_row(MYSQL* conn, std::string sql)
|
||||
{
|
||||
std::vector<std::string> rval;
|
||||
Row rval;
|
||||
MYSQL_RES* res;
|
||||
|
||||
if (mysql_query(conn, sql.c_str()) == 0 && (res = mysql_store_result(conn)))
|
||||
|
Reference in New Issue
Block a user