From 68cc982dcb7c1063a96f7ec9b7ccb95da4919d6b Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 10 Feb 2020 13:54:57 +0100 Subject: BLI: improve various C++ data structures The changes come from the `functions` branch, where I'm using these structures a lot. This also includes a new `BLI::Optional` type, which is similar to `std::Optional` which can be used when Blender starts using C++17. --- source/blender/blenlib/BLI_kdtree.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/blenlib/BLI_kdtree.h') diff --git a/source/blender/blenlib/BLI_kdtree.h b/source/blender/blenlib/BLI_kdtree.h index 9e966ffb798..9ba045fdbf8 100644 --- a/source/blender/blenlib/BLI_kdtree.h +++ b/source/blender/blenlib/BLI_kdtree.h @@ -17,6 +17,10 @@ #ifndef __BLI_KDTREE_H__ #define __BLI_KDTREE_H__ +#ifdef __cplusplus +extern "C" { +#endif + /** \file * \ingroup bli * \brief A kd-tree for nearest neighbor search. @@ -66,4 +70,8 @@ #undef KDTreeNearest #undef KDTREE_PREFIX_ID +#ifdef __cplusplus +} +#endif + #endif /* __BLI_KDTREE_H__ */ -- cgit v1.2.3