Merge pull request #4549 from Gargaj/msvcfix

fix msvc warnings-as-errors
pull/4555/head^2
Kim Kulling 2022-06-01 17:39:01 +02:00 committed by GitHub
commit 7fcd961a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -2151,7 +2151,7 @@ void FBXConverter::SetShadingPropertiesCommon(aiMaterial *out_mat, const Propert
if (ok) { if (ok) {
out_mat->AddProperty(&ShininessExponent, 1, AI_MATKEY_SHININESS); out_mat->AddProperty(&ShininessExponent, 1, AI_MATKEY_SHININESS);
// Match Blender behavior to extract roughness when only shininess is present // Match Blender behavior to extract roughness when only shininess is present
const float roughness = 1.0 - (sqrt(ShininessExponent) / 10.0); const float roughness = 1.0f - (sqrt(ShininessExponent) / 10.0f);
out_mat->AddProperty(&roughness, 1, AI_MATKEY_ROUGHNESS_FACTOR); out_mat->AddProperty(&roughness, 1, AI_MATKEY_ROUGHNESS_FACTOR);
} }

View File

@ -300,10 +300,10 @@ private:
const char separator = getOsSeparator(); const char separator = getOsSeparator();
for (it = in.begin(); it != in.end(); ++it) { for (it = in.begin(); it != in.end(); ++it) {
int remaining = std::distance(in.end(), it); const size_t remaining = std::distance(in.end(), it);
// Exclude :// and \\, which remain untouched. // Exclude :// and \\, which remain untouched.
// https://sourceforge.net/tracker/?func=detail&aid=3031725&group_id=226462&atid=1067632 // https://sourceforge.net/tracker/?func=detail&aid=3031725&group_id=226462&atid=1067632
if (remaining >= 3 && !strncmp(&*it, "://", 3 )) { if (remaining >= 3u && !strncmp(&*it, "://", 3 )) {
it += 3; it += 3;
continue; continue;
} }