diff --git a/examples/plugins/example/example.cpp b/examples/plugins/example/example.cpp index 5b935cbe992..2a304c2098d 100644 --- a/examples/plugins/example/example.cpp +++ b/examples/plugins/example/example.cpp @@ -6,6 +6,7 @@ // SPDX-FileCopyrightText: (c) 2021 The VAST Contributors // SPDX-License-Identifier: BSD-3-Clause +#include "vast/concept/printable/vast/integer.hpp" #include "vast/data.hpp" #include "vast/error.hpp" #include "vast/logger.hpp" @@ -74,7 +75,7 @@ example(example_actor::stateful_pointer self) { for (auto& [key, value] : config) { if (key == "max-events") { if (auto max_events = caf::get_if(&value)) { - VAST_VERBOSE("{} sets max-events to {}", self, max_events->value); + VAST_VERBOSE("{} sets max-events to {}", self, *max_events); self->state.max_events = max_events->value; } } diff --git a/libvast/test/arrow_table_slice.cpp b/libvast/test/arrow_table_slice.cpp index b6c4c86506c..a4365125490 100644 --- a/libvast/test/arrow_table_slice.cpp +++ b/libvast/test/arrow_table_slice.cpp @@ -74,7 +74,7 @@ enumeration operator"" _e(unsigned long long int x) { } integer operator"" _i(unsigned long long int x) { - return integer{static_cast(x)}; + return integer{detail::narrow_cast(x)}; } } // namespace diff --git a/libvast/vast/data/integer.hpp b/libvast/vast/data/integer.hpp index bc6fa0c967a..da649fea220 100644 --- a/libvast/vast/data/integer.hpp +++ b/libvast/vast/data/integer.hpp @@ -40,13 +40,12 @@ struct integer : detail::totally_ordered { friend typename Inspector::result_type inspect(Inspector& f, integer& x) { return f(caf::meta::type_name("vast.integer"), x.value); } -}; -/// @relates integer -template -void hash_append(Hasher& h, const integer& x) { - hash_append(h, x.value); -} + template + friend void hash_append(Hasher& h, const integer& x) { + hash_append(h, x.value); + } +}; } // namespace vast