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 11:33:28 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 13:17:08 +0300
commitf68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch)
tree2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/io/collada/DocumentImporter.cpp
parentc7b247a118e302a3afc6473797e53b6af28b69e2 (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/io/collada/DocumentImporter.cpp')
-rw-r--r--source/blender/io/collada/DocumentImporter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp
index 851e57bb750..660bbd7edb2 100644
--- a/source/blender/io/collada/DocumentImporter.cpp
+++ b/source/blender/io/collada/DocumentImporter.cpp
@@ -241,7 +241,7 @@ void DocumentImporter::finish()
if (!libnode_ob.empty()) {
- fprintf(stderr, "| Cleanup: free %d library nodes\n", (int)libnode_ob.size());
+ fprintf(stderr, "| Cleanup: free %d library nodes\n", int(libnode_ob.size()));
/* free all library_nodes */
std::vector<Object *>::iterator it;
for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) {
@@ -434,7 +434,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
Object *new_child = nullptr;
if (inodes.getCount()) { /* \todo loop through instance nodes */
const COLLADAFW::UniqueId &id = inodes[0]->getInstanciatedObjectId();
- fprintf(stderr, "Doing %d child nodes\n", (int)node_map.count(id));
+ fprintf(stderr, "Doing %d child nodes\n", int(node_map.count(id)));
new_child = create_instance_node(
object_map.find(id)->second, node_map[id], child_node, sce, is_library_node);
}
@@ -869,7 +869,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
double ymag = 2 * camera->getYMag().getValue();
double aspect = camera->getAspectRatio().getValue();
double xmag = aspect * ymag;
- cam->ortho_scale = (float)xmag;
+ cam->ortho_scale = float(xmag);
} break;
case CAM_PERSP:
default: {
@@ -890,7 +890,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
case COLLADAFW::Camera::X_AND_Y: {
switch (cam->type) {
case CAM_ORTHO:
- cam->ortho_scale = (float)camera->getXMag().getValue() * 2;
+ cam->ortho_scale = float(camera->getXMag().getValue()) * 2;
break;
case CAM_PERSP:
default: {
@@ -903,7 +903,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
case COLLADAFW::Camera::SINGLE_Y: {
switch (cam->type) {
case CAM_ORTHO:
- cam->ortho_scale = (float)camera->getYMag().getValue();
+ cam->ortho_scale = float(camera->getYMag().getValue());
break;
case CAM_PERSP:
default: {