fixes for Code/CryEngine

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-25 13:28:51 -07:00
committed by Esteban Papp
parent 81d26d322d
commit f6cdcddc52
12 changed files with 18 additions and 16 deletions
@@ -44,7 +44,7 @@ bool CSerializeXMLReaderImpl::Value(const char* name, int8& value)
}
else
{
value = temp;
value = static_cast<int8>(temp);
}
return bResult;
}
+1 -1
View File
@@ -320,7 +320,7 @@ bool CBinaryXmlNode::getAttr(const char* key, ColorB& value) const
// If we only found 3 values, a should be unchanged, and still be 255
if (r < 256 && g < 256 && b < 256 && a < 256)
{
value = ColorB(r, g, b, a);
value = ColorB(static_cast<uint8>(r), static_cast<uint8>(g), static_cast<uint8>(b), static_cast<uint8>(a));
return true;
}
}
@@ -244,7 +244,7 @@ bool XMLBinary::CXMLBinaryWriter::CompileTablesForNode(XmlNodeRef node, int nPar
nd.nContentStringOffset = nContentStringOffset;
nd.nParentIndex = nParentIndex;
nd.nFirstAttributeIndex = nFirstAttributeIndex;
nd.nAttributeCount = nAttributeCount;
nd.nAttributeCount = static_cast<uint16>(nAttributeCount);
m_nodes.push_back(nd);
}
@@ -271,7 +271,7 @@ bool XMLBinary::CXMLBinaryWriter::CompileTablesForNode(XmlNodeRef node, int nPar
}
}
m_nodes[nIndex].nChildCount = nChildCount;
m_nodes[nIndex].nChildCount = static_cast<uint16>(nChildCount);
return true;
}
+1 -1
View File
@@ -641,7 +641,7 @@ bool CXmlNode::getAttr(const char* key, ColorB& value) const
// If we only found 3 values, a should be unchanged, and still be 255
if (r < 256 && g < 256 && b < 256 && a < 256)
{
value = ColorB(r, g, b, a);
value = ColorB(static_cast<uint8>(r), static_cast<uint8>(g), static_cast<uint8>(b), static_cast<uint8>(a));
return true;
}
}