Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_vector.h
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | public: | ||||
| vector(InputIterator first, InputIterator last) | vector(InputIterator first, InputIterator last) | ||||
| : std::vector<value_type, allocator_type>(first, last) { } | : std::vector<value_type, allocator_type>(first, last) { } | ||||
| /* Copy constructor. */ | /* Copy constructor. */ | ||||
| vector(const vector &x) : std::vector<value_type, allocator_type>(x) { } | vector(const vector &x) : std::vector<value_type, allocator_type>(x) { } | ||||
| void shrink_to_fit(void) | void shrink_to_fit(void) | ||||
| { | { | ||||
| #if __cplusplus < 201103L | |||||
| vector<value_type>().swap(*this); | |||||
| #else | |||||
| std::vector<value_type, allocator_type>::shrink_to_fit(); | std::vector<value_type, allocator_type>::shrink_to_fit(); | ||||
| #endif | |||||
| } | } | ||||
| void free_memory(void) | void free_memory(void) | ||||
| { | { | ||||
| std::vector<value_type, allocator_type>::resize(0); | std::vector<value_type, allocator_type>::resize(0); | ||||
| shrink_to_fit(); | shrink_to_fit(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines | |||||