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:
authorHans Goudey <h.goudey@me.com>2021-02-02 20:26:17 +0300
committerHans Goudey <h.goudey@me.com>2021-02-02 20:26:17 +0300
commitb3f9895ab0fd92c4f8b4d37a93822e06b5c8353b (patch)
tree104e6337bf4f8c5ce21edb702df6f890f08d2104
parent1a5b988509fa7a660405dfb8854ea5c34183ef2c (diff)
Fix build error on windows after recent commit
rB198ff4703f84d0c3267 neglected to remove designated initializers, which are not supported in the C++ 17 standard.
-rw-r--r--source/blender/blenkernel/intern/node.cc57
1 files changed, 28 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 92f6f255587..39e23e34341 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -338,11 +338,10 @@ static void node_foreach_cache(ID *id,
void *user_data)
{
bNodeTree *nodetree = (bNodeTree *)id;
- IDCacheKey key = {
- .id_session_uuid = id->session_uuid,
- .offset_in_ID = offsetof(bNodeTree, previews),
- .cache_v = nodetree->previews,
- };
+ IDCacheKey key = {0};
+ key.id_session_uuid = id->session_uuid;
+ key.offset_in_ID = offsetof(bNodeTree, previews);
+ key.cache_v = nodetree->previews;
/* TODO, see also `direct_link_nodetree()` in readfile.c. */
#if 0
@@ -879,30 +878,30 @@ static void ntree_blend_read_expand(BlendExpander *expander, ID *id)
}
IDTypeInfo IDType_ID_NT = {
- .id_code = ID_NT,
- .id_filter = FILTER_ID_NT,
- .main_listbase_index = INDEX_ID_NT,
- .struct_size = sizeof(bNodeTree),
- .name = "NodeTree",
- .name_plural = "node_groups",
- .translation_context = BLT_I18NCONTEXT_ID_NODETREE,
- .flags = 0,
-
- .init_data = ntree_init_data,
- .copy_data = ntree_copy_data,
- .free_data = ntree_free_data,
- .make_local = nullptr,
- .foreach_id = node_foreach_id,
- .foreach_cache = node_foreach_cache,
-
- .blend_write = ntree_blend_write,
- .blend_read_data = ntree_blend_read_data,
- .blend_read_lib = ntree_blend_read_lib,
- .blend_read_expand = ntree_blend_read_expand,
-
- .blend_read_undo_preserve = nullptr,
-
- .lib_override_apply_post = nullptr,
+ /* id_code */ ID_NT,
+ /* id_filter */ FILTER_ID_NT,
+ /* main_listbase_index */ INDEX_ID_NT,
+ /* struct_size */ sizeof(bNodeTree),
+ /* name */ "NodeTree",
+ /* name_plural */ "node_groups",
+ /* translation_context */ BLT_I18NCONTEXT_ID_NODETREE,
+ /* flags */ 0,
+
+ /* init_data */ ntree_init_data,
+ /* copy_data */ ntree_copy_data,
+ /* free_data */ ntree_free_data,
+ /* make_local */ nullptr,
+ /* foreach_id */ node_foreach_id,
+ /* foreach_cache */ node_foreach_cache,
+
+ /* blend_write */ ntree_blend_write,
+ /* blend_read_data */ ntree_blend_read_data,
+ /* blend_read_lib */ ntree_blend_read_lib,
+ /* blend_read_expand */ ntree_blend_read_expand,
+
+ /* blend_read_undo_preserve */ nullptr,
+
+ /* lib_override_apply_post */ nullptr,
};
static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype)