small fixes

This commit is contained in:
sascha 2026-05-27 16:10:03 +02:00
parent b22a830d18
commit 98d58d8e60
2 changed files with 6 additions and 4 deletions

View File

@ -113,8 +113,8 @@ class null_observer : public observer<Type> {
public:
template < class OtherType >
explicit null_observer(const null_observer<OtherType> *) {}
void on_attach(repository_node &, Type &) override {}
void on_detach(repository_node &, Type &) override {}
void on_attach(const repository_node &, const Type &) const override {}
void on_detach(const repository_node &, const Type &) const override {}
void on_insert(Type &) override {}
void on_update(Type &) override {}
void on_delete(Type &) override {}

View File

@ -88,9 +88,11 @@ struct pk_field_locator {
desc.kind = pk_kind::uuid;
desc.is_known_at = [](void *obj, const std::size_t off) -> bool {
auto *p = reinterpret_cast<uuid16 *>(static_cast<std::uint8_t *>(obj) + off);
const auto *p = reinterpret_cast<uuid16 *>(static_cast<std::uint8_t *>(obj) + off);
// “unknown” = all zeros
for (auto b: *p) { if (b != 0) return true; }
for (const auto b: *p) {
if (b != 0) return true;
}
return false;
};