diff options
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_ref.hh')
-rw-r--r-- | source/blender/nodes/NOD_node_tree_ref.hh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/nodes/NOD_node_tree_ref.hh b/source/blender/nodes/NOD_node_tree_ref.hh index 13656c2e940..3b085248a39 100644 --- a/source/blender/nodes/NOD_node_tree_ref.hh +++ b/source/blender/nodes/NOD_node_tree_ref.hh @@ -14,8 +14,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __NOD_NODE_TREE_REF_HH__ -#define __NOD_NODE_TREE_REF_HH__ +#pragma once /** \file * \ingroup nodes @@ -249,13 +248,13 @@ inline const SocketRef &SocketRef::as_base() const inline const InputSocketRef &SocketRef::as_input() const { BLI_assert(this->is_input()); - return *(const InputSocketRef *)this; + return static_cast<const InputSocketRef &>(*this); } inline const OutputSocketRef &SocketRef::as_output() const { BLI_assert(this->is_output()); - return *(const OutputSocketRef *)this; + return static_cast<const OutputSocketRef &>(*this); } inline PointerRNA *SocketRef::rna() const @@ -436,5 +435,3 @@ inline bNodeTree *NodeTreeRef::btree() const } } // namespace blender::nodes - -#endif /* __NOD_NODE_TREE_REF_HH__ */ |