[Bf-blender-cvs] [0e9be6fd7d5] master: Cycles: Cleanup, remove unneeded method from vector
Sergey Sharybin
noreply at git.blender.org
Fri Nov 9 14:33:40 CET 2018
Commit: 0e9be6fd7d5eeddc329d5b75d5b89ce5d79c236e
Author: Sergey Sharybin
Date: Fri Nov 9 11:37:56 2018 +0100
Branches: master
https://developer.blender.org/rB0e9be6fd7d5eeddc329d5b75d5b89ce5d79c236e
Cycles: Cleanup, remove unneeded method from vector
Since we've defaulted to C++11, no need to override this
method manually anymore.
===================================================================
M intern/cycles/util/util_vector.h
===================================================================
diff --git a/intern/cycles/util/util_vector.h b/intern/cycles/util/util_vector.h
index 977019994be..df576f710a9 100644
--- a/intern/cycles/util/util_vector.h
+++ b/intern/cycles/util/util_vector.h
@@ -34,7 +34,6 @@ CCL_NAMESPACE_BEGIN
* Own subclass-ed vestion of std::vector. Subclass is needed because:
*
* - Use own allocator which keeps track of used/peak memory.
- *
* - Have method to ensure capacity is re-set to 0.
*/
template<typename value_type,
@@ -42,6 +41,8 @@ template<typename value_type,
class vector : public std::vector<value_type, allocator_type>
{
public:
+ typedef std::vector<value_type, allocator_type> BaseClass;
+
/* Default constructor. */
explicit vector() : std::vector<value_type, allocator_type>() { }
@@ -57,15 +58,10 @@ public:
/* Copy constructor. */
vector(const vector &x) : std::vector<value_type, allocator_type>(x) { }
- void shrink_to_fit(void)
- {
- std::vector<value_type, allocator_type>::shrink_to_fit();
- }
-
void free_memory(void)
{
- std::vector<value_type, allocator_type>::resize(0);
- shrink_to_fit();
+ BaseClass::resize(0);
+ BaseClass::shrink_to_fit();
}
/* Some external API might demand working with std::vector. */
More information about the Bf-blender-cvs
mailing list