1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-14 01:19:59 +00:00

Fix msvc warnings

components\lua\configuration.cpp(133): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
components\esm3\effectlist.cpp(35): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
components_tests\misc\testmathutil.cpp(54): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(62): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(131): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(135): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(135): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
components_tests\misc\testmathutil.cpp(139): warning C4305: 'argument': truncation from 'const double' to 'osg::Vec3f::value_type'
This commit is contained in:
elsid 2025-03-09 17:07:06 +01:00
parent a49a900a7b
commit 51d73e37df
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625
3 changed files with 8 additions and 7 deletions

View File

@ -51,7 +51,7 @@ namespace Misc
const std::pair<osg::Quat, osg::Vec3f> eulerAnglesXZQuat[] = {
{
osg::Quat(1, 0, 0, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 1, 0, 0),
@ -59,7 +59,7 @@ namespace Misc
},
{
osg::Quat(0, 0, 1, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 0, 0, 1),
@ -128,15 +128,15 @@ namespace Misc
const std::pair<osg::Quat, osg::Vec3f> eulerAnglesZYXQuat[] = {
{
osg::Quat(1, 0, 0, 0),
osg::Vec3f(osg::PI, 0, 0),
osg::Vec3f(osg::PIf, 0, 0),
},
{
osg::Quat(0, 1, 0, 0),
osg::Vec3f(osg::PI, 0, osg::PI),
osg::Vec3f(osg::PIf, 0, osg::PIf),
},
{
osg::Quat(0, 0, 1, 0),
osg::Vec3f(0, 0, osg::PI),
osg::Vec3f(0, 0, osg::PIf),
},
{
osg::Quat(0, 0, 0, 1),

View File

@ -32,7 +32,7 @@ namespace ESM
void EffectList::updateIndexes()
{
for (size_t i = 0; i < mList.size(); i++)
mList[i].mIndex = i;
mList[i].mIndex = static_cast<uint32_t>(i);
}
void EffectList::add(ESMReader& esm)

View File

@ -32,7 +32,8 @@ namespace
// Argument names
const auto str = LuaUtil::cast<std::string>(key);
argNames.push_back(icu::UnicodeString::fromUTF8(icu::StringPiece(str.data(), str.size())));
argNames.push_back(
icu::UnicodeString::fromUTF8(icu::StringPiece(str.data(), static_cast<int32_t>(str.size()))));
}
}
}