Static cast floats in atof usages where the datatype is actually float to avoid windows compiler warnings

This commit is contained in:
Akkadius
2020-07-12 17:25:50 -05:00
parent 758a30a080
commit 6a7a78af29
26 changed files with 418 additions and 409 deletions
@@ -193,18 +193,18 @@ public:
entry.zone = row[1] ? row[1] : "";
entry.version = atoi(row[2]);
entry.number = atoi(row[3]);
entry.y = atof(row[4]);
entry.x = atof(row[5]);
entry.z = atof(row[6]);
entry.heading = atof(row[7]);
entry.target_y = atof(row[8]);
entry.target_x = atof(row[9]);
entry.target_z = atof(row[10]);
entry.target_heading = atof(row[11]);
entry.y = static_cast<float>(atof(row[4]));
entry.x = static_cast<float>(atof(row[5]));
entry.z = static_cast<float>(atof(row[6]));
entry.heading = static_cast<float>(atof(row[7]));
entry.target_y = static_cast<float>(atof(row[8]));
entry.target_x = static_cast<float>(atof(row[9]));
entry.target_z = static_cast<float>(atof(row[10]));
entry.target_heading = static_cast<float>(atof(row[11]));
entry.zoneinst = atoi(row[12]);
entry.target_zone_id = atoi(row[13]);
entry.target_instance = atoi(row[14]);
entry.buffer = atof(row[15]);
entry.buffer = static_cast<float>(atof(row[15]));
entry.client_version_mask = atoi(row[16]);
entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]);
@@ -382,18 +382,18 @@ public:
entry.zone = row[1] ? row[1] : "";
entry.version = atoi(row[2]);
entry.number = atoi(row[3]);
entry.y = atof(row[4]);
entry.x = atof(row[5]);
entry.z = atof(row[6]);
entry.heading = atof(row[7]);
entry.target_y = atof(row[8]);
entry.target_x = atof(row[9]);
entry.target_z = atof(row[10]);
entry.target_heading = atof(row[11]);
entry.y = static_cast<float>(atof(row[4]));
entry.x = static_cast<float>(atof(row[5]));
entry.z = static_cast<float>(atof(row[6]));
entry.heading = static_cast<float>(atof(row[7]));
entry.target_y = static_cast<float>(atof(row[8]));
entry.target_x = static_cast<float>(atof(row[9]));
entry.target_z = static_cast<float>(atof(row[10]));
entry.target_heading = static_cast<float>(atof(row[11]));
entry.zoneinst = atoi(row[12]);
entry.target_zone_id = atoi(row[13]);
entry.target_instance = atoi(row[14]);
entry.buffer = atof(row[15]);
entry.buffer = static_cast<float>(atof(row[15]));
entry.client_version_mask = atoi(row[16]);
entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]);
@@ -426,18 +426,18 @@ public:
entry.zone = row[1] ? row[1] : "";
entry.version = atoi(row[2]);
entry.number = atoi(row[3]);
entry.y = atof(row[4]);
entry.x = atof(row[5]);
entry.z = atof(row[6]);
entry.heading = atof(row[7]);
entry.target_y = atof(row[8]);
entry.target_x = atof(row[9]);
entry.target_z = atof(row[10]);
entry.target_heading = atof(row[11]);
entry.y = static_cast<float>(atof(row[4]));
entry.x = static_cast<float>(atof(row[5]));
entry.z = static_cast<float>(atof(row[6]));
entry.heading = static_cast<float>(atof(row[7]));
entry.target_y = static_cast<float>(atof(row[8]));
entry.target_x = static_cast<float>(atof(row[9]));
entry.target_z = static_cast<float>(atof(row[10]));
entry.target_heading = static_cast<float>(atof(row[11]));
entry.zoneinst = atoi(row[12]);
entry.target_zone_id = atoi(row[13]);
entry.target_instance = atoi(row[14]);
entry.buffer = atof(row[15]);
entry.buffer = static_cast<float>(atof(row[15]));
entry.client_version_mask = atoi(row[16]);
entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]);