fixes for Code/CryEngine
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -473,7 +473,7 @@ void CLocalizedStringsManager::ParseFirstLine(IXmlTableReader* pXmlTableReader,
|
||||
const char* pFind = strstr(sCellContent.c_str(), sLocalizedColumnNames[i]);
|
||||
if (pFind != 0)
|
||||
{
|
||||
nCellIndexToType[nCellIndex] = i;
|
||||
nCellIndexToType[nCellIndex] = static_cast<char>(i);
|
||||
|
||||
// find SoundMood
|
||||
if (i == ELOCALIZED_COLUMN_SOUNDMOOD)
|
||||
|
||||
@@ -1227,7 +1227,7 @@ void CLog::CreateBackupFile() const
|
||||
|
||||
while (!fileSystem->Eof(inFileHandle))
|
||||
{
|
||||
uint8 c = AZ::IO::GetC(inFileHandle);
|
||||
uint8 c = static_cast<uint8>(AZ::IO::GetC(inFileHandle));
|
||||
|
||||
if (c == '\"')
|
||||
{
|
||||
|
||||
@@ -2464,8 +2464,9 @@ void CXConsole::DisplayVarValue(ICVar* pVar)
|
||||
sValue += " (";
|
||||
if (nonAlphaBits != 0)
|
||||
{
|
||||
char nonAlphaChars[3]; // 1..63 + '\0'
|
||||
sValue += azitoa(nonAlphaBits, nonAlphaChars, AZ_ARRAY_SIZE(nonAlphaChars), 10);
|
||||
char nonAlphaChars[3] = { 0 }; // 1..63 + '\0'
|
||||
azitoa(nonAlphaBits, nonAlphaChars, AZ_ARRAY_SIZE(nonAlphaChars), 10);
|
||||
sValue += nonAlphaChars;
|
||||
sValue += ", ";
|
||||
}
|
||||
sValue += alphaChars;
|
||||
|
||||
@@ -44,7 +44,7 @@ bool CSerializeXMLReaderImpl::Value(const char* name, int8& value)
|
||||
}
|
||||
else
|
||||
{
|
||||
value = temp;
|
||||
value = static_cast<int8>(temp);
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user