Return blank string values for string entries that return back null

This commit is contained in:
Akkadius
2020-04-04 04:48:46 -05:00
parent 15c9b64120
commit fe7e850a04
97 changed files with 788 additions and 790 deletions
+6 -6
View File
@@ -139,12 +139,12 @@ public:
if (results.RowCount() == 1) {
Horses entry{};
entry.filename = row[0];
entry.filename = row[0] ? row[0] : "";
entry.race = atoi(row[1]);
entry.gender = atoi(row[2]);
entry.texture = atoi(row[3]);
entry.mountspeed = atof(row[4]);
entry.notes = row[5];
entry.notes = row[5] ? row[5] : "";
return entry;
}
@@ -272,12 +272,12 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
Horses entry{};
entry.filename = row[0];
entry.filename = row[0] ? row[0] : "";
entry.race = atoi(row[1]);
entry.gender = atoi(row[2]);
entry.texture = atoi(row[3]);
entry.mountspeed = atof(row[4]);
entry.notes = row[5];
entry.notes = row[5] ? row[5] : "";
all_entries.push_back(entry);
}
@@ -302,12 +302,12 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
Horses entry{};
entry.filename = row[0];
entry.filename = row[0] ? row[0] : "";
entry.race = atoi(row[1]);
entry.gender = atoi(row[2]);
entry.texture = atoi(row[3]);
entry.mountspeed = atof(row[4]);
entry.notes = row[5];
entry.notes = row[5] ? row[5] : "";
all_entries.push_back(entry);
}