Improve code

This commit is contained in:
Lynix
2020-07-31 12:36:37 +02:00
parent 2271432748
commit 10860ed562
2 changed files with 6 additions and 14 deletions

View File

@@ -49,7 +49,7 @@ namespace Nz
inline unsigned int SpirvWriter::CountWord(const std::string_view& str)
{
return (str.size() + 1 + 4 - 1) / 4; //< + 1 for null character
return (static_cast<unsigned int>(str.size() + 1) + sizeof(UInt32) - 1) / sizeof(UInt32); //< + 1 for null character
}
}