Fix a compiler warning

This commit is contained in:
an-tao 2018-12-04 22:46:33 +08:00
parent a72fc5e433
commit afe0eca5e8
2 changed files with 1 additions and 3 deletions

View File

@ -87,7 +87,6 @@ void create_model::createModelClassFromPG(const std::string &path, const DbClien
{
auto row = r[i];
ColumnInfo info;
memset(&info, 0, sizeof(info));
info._index = i;
info._dbType = "pg";
info._colName = row["column_name"].as<std::string>();
@ -315,7 +314,6 @@ void create_model::createModelClassFromMysql(const std::string &path, const DbCl
if (!isNull)
{
ColumnInfo info;
memset(&info, 0, sizeof(info));
info._index = i;
info._dbType = "pg";
info._colName = field;

View File

@ -38,7 +38,7 @@ struct ColumnInfo
std::string _colDatabaseType;
std::string _dbType;
ssize_t _colLength = -1;
size_t _index;
size_t _index = 0;
bool _isAutoVal = false;
bool _isPrimaryKey = false;
bool _notNull = false;