diff options
-rw-r--r-- | include/sord/sordmm.hpp | 2 | ||||
-rw-r--r-- | src/sord.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/sord/sordmm.hpp b/include/sord/sordmm.hpp index b1226d6..3a7c0ea 100644 --- a/include/sord/sordmm.hpp +++ b/include/sord/sordmm.hpp @@ -92,7 +92,7 @@ public: serd_env_set_prefix(_c_obj, &name_node, &uri_node); } - inline std::string qualify(std::string uri) const + inline std::string qualify(const std::string& uri) const { const SerdNode uri_node = string_to_node(SERD_URI, uri); SerdNode prefix; @@ -169,10 +169,12 @@ sord_node_record_key(const SordNode* n) static size_t sord_node_hash(const SordNode* const node) { + const size_t head = node->node.type; + size_t hash = 0U; hash = zix_digest(hash, (const uint8_t*)node->node.buf, node->node.n_bytes); - hash = zix_digest(hash, &node->node.type, sizeof(node->node.type)); + hash = zix_digest(hash, &head, sizeof(head)); if (node->node.type == SERD_LITERAL) { hash = zix_digest(hash, &node->meta.lit, sizeof(node->meta.lit)); } |