Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-11-09 13:37:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-09 13:42:12 +0300
commit0e9be6fd7d5eeddc329d5b75d5b89ce5d79c236e (patch)
tree1fac6061db1b536a20f50d127c24910e7d2d79df
parentcb4b5e12abf1fc6cf9ffc0944e0a1bc406286c63 (diff)
Cycles: Cleanup, remove unneeded method from vector
Since we've defaulted to C++11, no need to override this method manually anymore.
-rw-r--r--intern/cycles/util/util_vector.h12
1 files changed, 4 insertions, 8 deletions
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. */