mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
Convert static member constexprs to non-reference type.
This commit is contained in:
parent
dfba309423
commit
3e3483a2d1
11 changed files with 18 additions and 18 deletions
|
@ -93,7 +93,7 @@ final
|
|||
{
|
||||
struct ctx;
|
||||
|
||||
static constexpr const size_t &digest_size
|
||||
static constexpr const size_t digest_size
|
||||
{
|
||||
160 / 8
|
||||
};
|
||||
|
@ -122,7 +122,7 @@ final
|
|||
{
|
||||
struct ctx;
|
||||
|
||||
static constexpr const size_t &digest_size
|
||||
static constexpr const size_t digest_size
|
||||
{
|
||||
256 / 8
|
||||
};
|
||||
|
@ -151,7 +151,7 @@ final
|
|||
{
|
||||
struct ctx;
|
||||
|
||||
static constexpr const size_t &digest_size
|
||||
static constexpr const size_t digest_size
|
||||
{
|
||||
160 / 8
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace ircd
|
|||
struct ircd::exception
|
||||
:virtual std::exception
|
||||
{
|
||||
static constexpr const size_t &BUFSIZE
|
||||
static constexpr const size_t BUFSIZE
|
||||
{
|
||||
512UL
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@ struct ircd::m::event::auth
|
|||
json::property<name::auth_events, json::array>
|
||||
>
|
||||
{
|
||||
static constexpr const size_t &MAX
|
||||
static constexpr const size_t MAX
|
||||
{
|
||||
5
|
||||
};
|
||||
|
|
|
@ -114,10 +114,10 @@ struct ircd::m::event
|
|||
using closure_idx_bool = std::function<bool (const idx &)>;
|
||||
using closure_iov_mutable = std::function<void (json::iov &)>;
|
||||
|
||||
static constexpr const size_t &MAX_SIZE {64_KiB};
|
||||
static constexpr const size_t &TYPE_MAX_SIZE {256};
|
||||
static constexpr const size_t &ORIGIN_MAX_SIZE {256};
|
||||
static constexpr const size_t &STATE_KEY_MAX_SIZE {512};
|
||||
static constexpr const size_t MAX_SIZE {64_KiB};
|
||||
static constexpr const size_t TYPE_MAX_SIZE {256};
|
||||
static constexpr const size_t ORIGIN_MAX_SIZE {256};
|
||||
static constexpr const size_t STATE_KEY_MAX_SIZE {512};
|
||||
static conf::item<size_t> max_size;
|
||||
static thread_local char buf[4][MAX_SIZE]; // general-use scratch
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ struct ircd::m::event::prev
|
|||
json::property<name::prev_events, json::array>
|
||||
>
|
||||
{
|
||||
static constexpr const size_t &MAX
|
||||
static constexpr const size_t MAX
|
||||
{
|
||||
20
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ struct ircd::m::id
|
|||
struct printer static const printer;
|
||||
struct valid static const valid;
|
||||
|
||||
static constexpr const size_t &MAX_SIZE
|
||||
static constexpr const size_t MAX_SIZE
|
||||
{
|
||||
RB_MXID_MAXLEN // set by ./configure; should be 255
|
||||
};
|
||||
|
|
|
@ -131,8 +131,8 @@ struct ircd::m::room
|
|||
using closure = std::function<void (const room &)>;
|
||||
using closure_bool = std::function<bool (const room &)>;
|
||||
|
||||
static constexpr const size_t &VERSION_MAX_SIZE {32};
|
||||
static constexpr const size_t &MEMBERSHIP_MAX_SIZE {16};
|
||||
static constexpr const size_t VERSION_MAX_SIZE {32};
|
||||
static constexpr const size_t MEMBERSHIP_MAX_SIZE {16};
|
||||
|
||||
id room_id;
|
||||
event::id event_id;
|
||||
|
|
|
@ -21,7 +21,7 @@ struct ircd::m::user::room_account_data
|
|||
"ircd.account_data"
|
||||
};
|
||||
|
||||
static constexpr const size_t &typebuf_size
|
||||
static constexpr const size_t typebuf_size
|
||||
{
|
||||
m::room::id::MAX_SIZE + 24
|
||||
};
|
||||
|
|
|
@ -21,7 +21,7 @@ struct ircd::m::user::room_tags
|
|||
"ircd.room_tag"
|
||||
};
|
||||
|
||||
static constexpr const size_t &typebuf_size
|
||||
static constexpr const size_t typebuf_size
|
||||
{
|
||||
m::room::id::MAX_SIZE + 16
|
||||
};
|
||||
|
|
|
@ -102,7 +102,7 @@ struct boost::spirit::karma::rule<char *, T1, T2, T3, T4>
|
|||
);
|
||||
}
|
||||
|
||||
static constexpr const size_t &buf_sz
|
||||
static constexpr const size_t buf_sz
|
||||
{
|
||||
512 - 32 // offsetof buf
|
||||
};
|
||||
|
|
|
@ -77,7 +77,7 @@ struct boost::spirit::qi::rule<const char *, T1, T2, T3, T4>
|
|||
using type = attr_type;
|
||||
};
|
||||
|
||||
static constexpr const size_t ¶ms_size
|
||||
static constexpr const auto ¶ms_size
|
||||
{
|
||||
parameter_types_size::value
|
||||
};
|
||||
|
@ -119,7 +119,7 @@ struct boost::spirit::qi::rule<const char *, T1, T2, T3, T4>
|
|||
/// Slightly exceeds the worst-case for currently in use compiled
|
||||
/// expressions. It is possible to build an expression which exceeds
|
||||
/// this value, and in that case, feel free to increase this size.
|
||||
static constexpr const size_t &buf_sz
|
||||
static constexpr const size_t buf_sz
|
||||
{
|
||||
2048 - 32 // offsetof buf
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue