Bug 1845440 - Get rid of useless global constructor for kBidiLevelNone r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D184550
This commit is contained in:
serge-sans-paille 2023-07-26 09:10:12 +00:00
parent c5739e2655
commit bcc4d5e330
2 changed files with 3 additions and 4 deletions

View File

@ -45,8 +45,8 @@ enum class BidiDirection : uint8_t {
*/
class BidiEmbeddingLevel {
public:
explicit BidiEmbeddingLevel(uint8_t aValue) : mValue(aValue) {}
explicit BidiEmbeddingLevel(int aValue)
constexpr explicit BidiEmbeddingLevel(uint8_t aValue) : mValue(aValue) {}
constexpr explicit BidiEmbeddingLevel(int aValue)
: mValue(static_cast<uint8_t>(aValue)) {}
BidiEmbeddingLevel() = default;

View File

@ -382,8 +382,7 @@ struct IntrinsicSize {
};
// Pseudo bidi embedding level indicating nonexistence.
static const mozilla::intl::BidiEmbeddingLevel kBidiLevelNone =
mozilla::intl::BidiEmbeddingLevel(0xff);
constexpr mozilla::intl::BidiEmbeddingLevel kBidiLevelNone(0xff);
struct FrameBidiData {
mozilla::intl::BidiEmbeddingLevel baseLevel;