Age | Commit message (Collapse) | Author |
|
Add a macro to make slicing clear in the code and quiet for static
analysis.
|
|
When internal linkage is necessary, anonymous namespaces fulfil the same
purpose in a better way. See also:
https://stackoverflow.com/questions/4422507/superiority-of-unnamed-namespace-over-static
|
|
It's better than const char* because any interaction between const char*
and QString assumes that const char* contains UTF-8, which is
pessimistic and therefore inefficient; at the same time:
- construction of QString from QLatin1String is extremely fast
(boiling down to padding null bytes)
- "something"_ls is much shorter than QStringLiteral("something")
- "something"_ls produces a direct pointer to the literal at compile
time, using the benefits of raw string literals (deduplication, e.g.)
The library API will also transition to QLatin1String where applicable,
likely in 0.8.
|
|
- Templates and constexpr imply inline
- A function called from a single site better be inlined.
|
|
QChar now accepts more types for construction, and that unraveled
concatenation of a Type/SecondaryType character with a QString.
To fix it, give the compiler a hint by casting to the enum's underlying
type (which also nicely documents that we _actually_ switch from enum
to character type).
|
|
|
|
As per the latest iteration of MSC2312, room/, user/ and event/ are
only supported for parsing and replication but not for emitting from
Matrix identifiers.
(cherry picked from commit 86f24d1ecf300b82b3a7253b81a2c392669d2c2b)
|
|
After going through all the files and the history of commits on them
it was clear that some copyright statements are obsolete (the code has
been overwritten since) and some are missing. This commit tries best to
remedy that, along with adding SPDX tags where they were still not used.
Also, a minimal SPDX convention is documented for further contributions.
Closes #426.
|
|
(cherry picked from commit 0a2acd750a4155969092be674ed3dd9a71b2354f)
|
|
|
|
The first character inside the fragment should be /
(cherry picked from commit 948be2ef2bf04e306fbb0e2c3e0a98f4151337a7)
|
|
|
|
|