diff options
author | Patrick Simianer <p@simianer.de> | 2013-11-26 11:11:17 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-11-26 11:11:17 +0100 |
commit | e346cd5cd3c5d7164819c35e485a9850d825996e (patch) | |
tree | 6c09b737569ac8471fa2a6dfda71230c554be0c8 /utils/value_array.h | |
parent | 95a69136109665881be66ff4e8f9eca6abb08477 (diff) | |
parent | 62a2526e69eb1570bf349763fc8bb65179337918 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'utils/value_array.h')
-rw-r--r-- | utils/value_array.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/value_array.h b/utils/value_array.h index 12fc9d87..e59349b5 100644 --- a/utils/value_array.h +++ b/utils/value_array.h @@ -1,8 +1,6 @@ #ifndef VALUE_ARRAY_H #define VALUE_ARRAY_H -//TODO: option for non-constructed version (type_traits pod?), option for small array optimization (if sz < N, store inline in union, see small_vector.h) - #define DBVALUEARRAY(x) x #include <cstdlib> @@ -30,8 +28,7 @@ // valarray like in that size is fixed (so saves space compared to vector), but same interface as vector (less resize/push_back/insert, of course) template <class T, class A = std::allocator<T> > -class ValueArray : A // private inheritance so stateless allocator adds no size. -{ +class ValueArray : A { // private inheritance so stateless allocator adds no size. typedef ValueArray<T,A> Self; public: #if VALUE_ARRAY_OSTREAM @@ -323,14 +320,14 @@ private: //friend class boost::serialization::access; public: template <class Archive> - void save(Archive& ar, unsigned int version) const + void save(Archive& ar, unsigned int /*version*/) const { ar << sz; for (size_type i = 0; i != sz; ++i) ar << at(i); } template <class Archive> - void load(Archive& ar, unsigned int version) + void load(Archive& ar, unsigned int /*version*/) { size_type s; ar >> s; |