[Bf-blender-cvs] [48e0785] object_nodes: Fix compiler warning from illegal zero-initialization in C++0x.
Lukas Tönne
noreply at git.blender.org
Sun Dec 27 14:43:17 CET 2015
Commit: 48e0785dc5e294b9c4d830a60207d55b8bd3c60a
Author: Lukas Tönne
Date: Sun Dec 27 14:42:37 2015 +0100
Branches: object_nodes
https://developer.blender.org/rB48e0785dc5e294b9c4d830a60207d55b8bd3c60a
Fix compiler warning from illegal zero-initialization in C++0x.
===================================================================
M source/blender/blenvm/intern/bvm_api.cc
M source/blender/depsgraph/intern/depsgraph_build_nodes.cc
M source/blender/depsgraph/intern/depsgraph_build_relations.cc
===================================================================
diff --git a/source/blender/blenvm/intern/bvm_api.cc b/source/blender/blenvm/intern/bvm_api.cc
index 51f1314..8f22b68 100644
--- a/source/blender/blenvm/intern/bvm_api.cc
+++ b/source/blender/blenvm/intern/bvm_api.cc
@@ -30,6 +30,7 @@
*/
#include <set>
+#include <string.h>
#include "MEM_guardedalloc.h"
@@ -360,9 +361,9 @@ struct EvalGlobalsHandle
}
EvalGlobalsHandle(EvalGlobals *globals) :
- handle({0}),
globals(globals)
{
+ memset(&handle, 0, sizeof(handle));
handle.add_object_relation = add_object_relation;
handle.add_bone_relation = add_bone_relation;
}
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index 294aada..dbb1a77 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -124,9 +124,9 @@ struct DepsgraphNodeBuilderHandle
}
DepsgraphNodeBuilderHandle(DepsgraphNodeBuilder *builder) :
- handle({0}),
builder(builder)
{
+ memset(&handle, 0, sizeof(handle));
handle.add_texture_relation = add_texture_relation;
handle.add_nodetree_relation = add_nodetree_relation;
}
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index 72b7e57..4cc64e7 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
@@ -154,11 +154,11 @@ struct DepsgraphRelationBuilderHandle
}
DepsgraphRelationBuilderHandle(DepsgraphRelationBuilder *builder, OperationDepsNode *node, const string &default_name = "") :
- handle({0}),
builder(builder),
node(node),
default_name(default_name)
{
+ memset(&handle, 0, sizeof(handle));
BLI_assert(node != NULL);
handle.add_scene_relation = add_scene_relation;
handle.add_object_relation = add_object_relation;
More information about the Bf-blender-cvs
mailing list