Browse Source

Value: first parameter by const of constructor

Eric Ramat 5 months ago
parent
commit
f4e7ddf73d
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/artis-star/common/Value.hpp

+ 2 - 4
src/artis-star/common/Value.hpp

@@ -47,11 +47,11 @@ public:
   {}
 
   template<typename T>
-  Value(T value)
+  Value(const T value)
   { assign(&value, sizeof(T), typeid(T).hash_code()); }
 
   template<typename T>
-  Value(T *value, size_t size)
+  Value(const T *value, size_t size)
   { assign(value, sizeof(T) * size, typeid(T *).hash_code()); }
 
   Value(void *content, size_t size)
@@ -105,8 +105,6 @@ public:
 
     size_t size = _size / sizeof(T);
 
-    assert(size > 1);
-
     for (size_t i = 0; i < size; ++i) {
       value.push_back(((T *) (_content))[i]);
     }