diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-04 08:25:39 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-04 08:25:39 +1000 |
commit | aecda22f08cfe2c137c7f6fb8d8669e91426f4b2 (patch) | |
tree | 9dff29990f49f344dd541c640f77aaf9d294e93d /src | |
parent | 3ad02ff31705ff568db2ec87244f2c0214112f9b (diff) | |
download | scintilla-mirror-aecda22f08cfe2c137c7f6fb8d8669e91426f4b2.tar.gz |
Mark WidthF const noexcept and remove 'f' suffixes as XYPOSITION is now double.
Diffstat (limited to 'src')
-rw-r--r-- | src/Geometry.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index bf8f4096e..e9cb5a6c8 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -243,10 +243,10 @@ class Stroke { public: ColourAlpha colour; XYPOSITION width; - constexpr Stroke(ColourAlpha colour_, XYPOSITION width_=1.0f) noexcept : + constexpr Stroke(ColourAlpha colour_, XYPOSITION width_=1.0) noexcept : colour(colour_), width(width_) { } - constexpr float WidthF() { + constexpr float WidthF() const noexcept { return static_cast<float>(width); } }; @@ -269,10 +269,10 @@ class FillStroke { public: Fill fill; Stroke stroke; - constexpr FillStroke(ColourAlpha colourFill_, ColourAlpha colourStroke_, XYPOSITION widthStroke_=1.0f) noexcept : + constexpr FillStroke(ColourAlpha colourFill_, ColourAlpha colourStroke_, XYPOSITION widthStroke_=1.0) noexcept : fill(colourFill_), stroke(colourStroke_, widthStroke_) { } - constexpr FillStroke(ColourAlpha colourBoth, XYPOSITION widthStroke_=1.0f) noexcept : + constexpr FillStroke(ColourAlpha colourBoth, XYPOSITION widthStroke_=1.0) noexcept : fill(colourBoth), stroke(colourBoth, widthStroke_) { } }; |