diff --git a/include/ircd/m/dbs.h b/include/ircd/m/dbs.h index 35e8d7439..bb1b172e8 100644 --- a/include/ircd/m/dbs.h +++ b/include/ircd/m/dbs.h @@ -33,17 +33,17 @@ namespace ircd::m::dbs extern db::column state_node; // Lowlevel util - static const size_t ROOM_STATE_KEY_MAX_SIZE {id::MAX_SIZE + 256 + 256}; + constexpr size_t ROOM_STATE_KEY_MAX_SIZE {id::MAX_SIZE + 256 + 256}; string_view room_state_key(const mutable_buffer &out, const id::room &, const string_view &type, const string_view &state_key); string_view room_state_key(const mutable_buffer &out, const id::room &, const string_view &type); std::pair room_state_key(const string_view &amalgam); - static const size_t ROOM_JOINED_KEY_MAX_SIZE {id::MAX_SIZE + 256 + id::MAX_SIZE}; + constexpr size_t ROOM_JOINED_KEY_MAX_SIZE {id::MAX_SIZE + 256 + id::MAX_SIZE}; string_view room_joined_key(const mutable_buffer &out, const id::room &, const string_view &origin, const id::user &member); string_view room_joined_key(const mutable_buffer &out, const id::room &, const string_view &origin); std::pair room_joined_key(const string_view &amalgam); - static const size_t ROOM_EVENTS_KEY_MAX_SIZE {id::MAX_SIZE + 1 + 8 + 8}; + constexpr size_t ROOM_EVENTS_KEY_MAX_SIZE {id::MAX_SIZE + 1 + 8 + 8}; string_view room_events_key(const mutable_buffer &out, const id::room &, const uint64_t &depth, const event::idx &); string_view room_events_key(const mutable_buffer &out, const id::room &, const uint64_t &depth); std::pair room_events_key(const string_view &amalgam); diff --git a/include/ircd/m/id.h b/include/ircd/m/id.h index 078d9e694..da11bde01 100644 --- a/include/ircd/m/id.h +++ b/include/ircd/m/id.h @@ -60,7 +60,7 @@ struct ircd::m::id struct printer static const printer; struct validator static const validator; - static constexpr const size_t MAX_SIZE + static constexpr const size_t &MAX_SIZE { 255 };