]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
useInitializationList
authorgtsoul-tech <gtsoulkanakis@gmail.com>
Tue, 23 Apr 2024 11:47:21 +0000 (14:47 +0300)
committergtsoul-tech <gtsoulkanakis@gmail.com>
Tue, 23 Apr 2024 11:47:21 +0000 (14:47 +0300)
src/util/graph_small_color_map.h

index 249b71531c57fea6d702f5412147a61060ae7991..a85f4b778bc48b22ca51e3084177bd3cb4c7d82e 100644 (file)
@@ -102,10 +102,10 @@ public:
     using category = boost::read_write_property_map_tag;
 
     small_color_map(size_t n_in, const IndexMap &index_map_in)
-        : n(n_in), index_map(index_map_in) {
-        size_t num_bytes = (n + entries_per_byte - 1) / entries_per_byte;
-        data = std::make_shared<std::vector<unsigned char>>(num_bytes);
-        fill(small_color::white);
+    : n(n_in), 
+      index_map(index_map_in),
+      data(std::make_shared<std::vector<unsigned char>>((n_in + entries_per_byte - 1) / entries_per_byte)) {
+    fill(small_color::white);
     }
 
     void fill(small_color color) {