Cycles: Cleanup, remove unneeded method from vector
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 9 Nov 2018 10:37:56 +0000 (11:37 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 9 Nov 2018 10:42:12 +0000 (11:42 +0100)
Since we've defaulted to C++11, no need to override this
method manually anymore.

intern/cycles/util/util_vector.h

index 977019994bec8ad62d3a660ea1f25a92301d6501..df576f710a90506279cc94644fbcfed06c09141f 100644 (file)
@@ -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. */