diff --git a/src/radix_tree.cpp b/src/radix_tree.cpp index 64e305f5..208856ad 100644 --- a/src/radix_tree.cpp +++ b/src/radix_tree.cpp @@ -33,7 +33,6 @@ #include "radix_tree.hpp" #include -#include #include node::node (unsigned char *data) : data_ (data) @@ -81,7 +80,7 @@ unsigned char *node::prefix () return data_ + 3 * sizeof (uint32_t); } -void node::set_prefix (unsigned char const *bytes) +void node::set_prefix (const unsigned char *bytes) { memcpy (prefix (), bytes, prefix_length ()); } @@ -91,7 +90,7 @@ unsigned char *node::first_bytes () return prefix () + prefix_length (); } -void node::set_first_bytes (unsigned char const *bytes) +void node::set_first_bytes (const unsigned char *bytes) { memcpy (first_bytes (), bytes, edgecount ()); } @@ -113,7 +112,7 @@ unsigned char *node::node_ptrs () return prefix () + prefix_length () + edgecount (); } -void node::set_node_ptrs (unsigned char const *ptrs) +void node::set_node_ptrs (const unsigned char *ptrs) { memcpy (node_ptrs (), ptrs, edgecount () * sizeof (void *)); } diff --git a/src/radix_tree.hpp b/src/radix_tree.hpp index 3e3834ea..a5f77e50 100644 --- a/src/radix_tree.hpp +++ b/src/radix_tree.hpp @@ -83,7 +83,7 @@ struct node inline void set_prefix (const unsigned char *prefix); inline void set_first_bytes (const unsigned char *bytes); inline void set_first_byte_at (size_t i, unsigned char byte); - inline void set_node_ptrs (unsigned char const *ptrs); + inline void set_node_ptrs (const unsigned char *ptrs); inline void set_node_at (size_t i, node n); inline void set_edge_at (size_t i, unsigned char byte, node n); void resize (size_t prefix_length, size_t edgecount);