Code/Editor

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-16 15:56:36 -07:00
parent e6b5342c07
commit 2963739288
51 changed files with 286 additions and 337 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image)
token = azstrtok(nullptr, 0, seps, &nextToken);
validData = validData && (azstricmp(token, "nodata_value") == 0);
token = azstrtok(nullptr, 0, seps, &nextToken);
nodataValue = atof(token);
nodataValue = static_cast<float>(atof(token));
if (!validData)
{
@@ -157,7 +157,7 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image)
if (token != nullptr)
{
// Negative heights aren't supported, clamp to 0.
pixelValue = max(0.0, atof(token));
pixelValue = max<float>(0.0f, static_cast<float>(atof(token)));
// If this is a location we specifically don't have data for, set it to 0.
if (pixelValue == nodataValue)