diff options
author | Hans Goudey <h.goudey@me.com> | 2021-05-19 23:13:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-05-19 23:13:05 +0300 |
commit | 58893eaef8414d27815fb20b049db14333bb4eb2 (patch) | |
tree | 2843d362d1cd9ec8ecfa2bece184087f779c4f31 /source/blender/nodes/geometry/nodes/node_geo_switch.cc | |
parent | 3d604ba867ed34b0e0ad7f58bcd2ffc482f8ada3 (diff) |
Cleanup: Use consistent order for functions in node files
After this commit, all geometry node "init" and "update" functions are
at the top of each file, right below the "layout" function. This means
you can always scroll to the bottom of the file to see the entry point,
and the boring boilerplate code is grouped in one section.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_switch.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_switch.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc index f27c2163188..576d9bed961 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc @@ -70,20 +70,6 @@ static void geo_node_switch_init(bNodeTree *UNUSED(tree), bNode *node) namespace blender::nodes { -template<typename T> -void output_input(GeoNodeExecParams ¶ms, - const bool input, - const StringRef input_suffix, - const StringRef output_identifier) -{ - if (input) { - params.set_output(output_identifier, params.extract_input<T>("B" + input_suffix)); - } - else { - params.set_output(output_identifier, params.extract_input<T>("A" + input_suffix)); - } -} - static void geo_node_switch_update(bNodeTree *UNUSED(ntree), bNode *node) { NodeSwitch *node_storage = (NodeSwitch *)node->storage; @@ -99,6 +85,20 @@ static void geo_node_switch_update(bNodeTree *UNUSED(ntree), bNode *node) } } +template<typename T> +void output_input(GeoNodeExecParams ¶ms, + const bool input, + const StringRef input_suffix, + const StringRef output_identifier) +{ + if (input) { + params.set_output(output_identifier, params.extract_input<T>("B" + input_suffix)); + } + else { + params.set_output(output_identifier, params.extract_input<T>("A" + input_suffix)); + } +} + static void geo_node_switch_exec(GeoNodeExecParams params) { const NodeSwitch &storage = *(const NodeSwitch *)params.node().storage; |