Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-25 13:27:46 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 15:31:31 +0300
commit21d77a417e17ac92bfc10dbd742c867d4019ce69 (patch)
treeec664b5c6ca7882bcc5a1e1ce09cad67b842af9d /source/blender/io
parentd35a10134cfdbd3e24a56218ef3f05aac2a2fc7e (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
Diffstat (limited to 'source/blender/io')
-rw-r--r--source/blender/io/collada/MeshImporter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index 6f77c233aac..ce7eada84d6 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -102,7 +102,7 @@ void WVDataWrapper::print()
COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
if (values->getCount()) {
for (int i = 0; i < values->getCount(); i += 2) {
- fprintf(stderr, "%.1f, %.1f\n", (float)(*values)[i], (float)(*values)[i + 1]);
+ fprintf(stderr, "%.1f, %.1f\n", float((*values)[i]), float((*values)[i + 1]));
}
}
} break;
@@ -133,8 +133,8 @@ void UVDataWrapper::getUV(int uv_index, float *uv)
if (values->empty()) {
return;
}
- uv[0] = (float)(*values)[uv_index * stride];
- uv[1] = (float)(*values)[uv_index * stride + 1];
+ uv[0] = float((*values)[uv_index * stride]);
+ uv[1] = float((*values)[uv_index * stride + 1]);
} break;
case COLLADAFW::MeshVertexData::DATA_TYPE_UNKNOWN:
@@ -832,10 +832,10 @@ void MeshImporter::get_vector(float v[3], COLLADAFW::MeshVertexData &arr, int i,
return;
}
- v[0] = (float)(*values)[i++];
- v[1] = (float)(*values)[i++];
+ v[0] = float((*values)[i++]);
+ v[1] = float((*values)[i++]);
if (stride >= 3) {
- v[2] = (float)(*values)[i];
+ v[2] = float((*values)[i]);
}
else {
v[2] = 0.0f;