diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Style.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Style.cxx b/src/Style.cxx index 2c78c5241..a080f452e 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -62,7 +62,9 @@ int DefaultFontSize() noexcept { try { return Platform::DefaultFontSize(); } catch (...) { - return 10; + // Should never happen + constexpr int sensibleFontSize = 10; + return sensibleFontSize; } } @@ -83,5 +85,5 @@ Style::Style(const char *fontName_) noexcept : void Style::Copy(std::shared_ptr<Font> font_, const FontMeasurements &fm_) noexcept { font = std::move(font_); - (FontMeasurements &)(*this) = fm_; + static_cast<FontMeasurements &>(*this) = fm_; } |
