void CVarManager::loadFromDb(sqlite3x::sqlite3_reader &reader) { while (reader.read()) { std::string name = reader.getstring(0); std::string value = reader.getstring(1); CVar* temp = findItem(name.c_str()); if (temp) temp->setValueOveride(value.c_str()); } }
/** * Builds column lookup std::map */ void tcSqlReader::BuildColumnLookup(sqlite3x::sqlite3_reader& tableInfo) { unsigned int fieldCount = 0; while(tableInfo.read()) { columnLookup[tableInfo.getstring(1)] = fieldCount++; } }