[Bf-blender-cvs] [54f7163310f] functions: minor changes
Jacques Lucke
noreply at git.blender.org
Wed Jul 17 18:03:07 CEST 2019
Commit: 54f7163310f0858f34c881577b222dd34924c7c4
Author: Jacques Lucke
Date: Wed Jul 17 15:57:17 2019 +0200
Branches: functions
https://developer.blender.org/rB54f7163310f0858f34c881577b222dd34924c7c4
minor changes
===================================================================
M source/blender/blenlib/BLI_kdtree.h
M source/blender/blenlib/BLI_string_map.hpp
===================================================================
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__ */
diff --git a/source/blender/blenlib/BLI_string_map.hpp b/source/blender/blenlib/BLI_string_map.hpp
index 5b5ba0e9697..32e705fe9a7 100644
--- a/source/blender/blenlib/BLI_string_map.hpp
+++ b/source/blender/blenlib/BLI_string_map.hpp
@@ -38,6 +38,11 @@ template<typename V> class StringMap {
public:
StringMap() = default;
+ uint size() const
+ {
+ return m_map.size();
+ }
+
void add_new(StringRef key, const V &value)
{
m_map.add_new(key.to_std_string(), value);
More information about the Bf-blender-cvs
mailing list