diff options
author | Neil <nyamatongwe@gmail.com> | 2019-01-15 11:01:52 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-01-15 11:01:52 +1100 |
commit | 8a3ff5e93b7e1ca8055e41891433146304969074 (patch) | |
tree | 3224261ed22f76d1de99e4823ed845c31a6239b5 /src/Style.h | |
parent | 1d055f5b839ddce03636f65c901fd59e304f5a42 (diff) | |
download | scintilla-mirror-8a3ff5e93b7e1ca8055e41891433146304969074.tar.gz |
Fix use of "0" for nulls and mark methods "noexcept" where simple.
Diffstat (limited to 'src/Style.h')
-rw-r--r-- | src/Style.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Style.h b/src/Style.h index 81b399806..103633373 100644 --- a/src/Style.h +++ b/src/Style.h @@ -17,7 +17,7 @@ struct FontSpecification { int size; int characterSet; int extraFontFlag; - FontSpecification() : + FontSpecification() noexcept : fontName(nullptr), weight(SC_WEIGHT_NORMAL), italic(false), @@ -25,22 +25,22 @@ struct FontSpecification { characterSet(0), extraFontFlag(0) { } - bool operator==(const FontSpecification &other) const; - bool operator<(const FontSpecification &other) const; + bool operator==(const FontSpecification &other) const noexcept; + bool operator<(const FontSpecification &other) const noexcept; }; // Just like Font but only has a copy of the FontID so should not delete it class FontAlias : public Font { public: - FontAlias(); + FontAlias() noexcept; // FontAlias objects can not be assigned except for initialization - FontAlias(const FontAlias &); + FontAlias(const FontAlias &) noexcept; FontAlias(FontAlias &&) = delete; FontAlias &operator=(const FontAlias &) = delete; FontAlias &operator=(FontAlias &&) = delete; ~FontAlias() override; - void MakeAlias(const Font &fontOrigin); - void ClearFont(); + void MakeAlias(const Font &fontOrigin) noexcept; + void ClearFont() noexcept; }; struct FontMeasurements { @@ -50,8 +50,8 @@ struct FontMeasurements { XYPOSITION aveCharWidth; XYPOSITION spaceWidth; int sizeZoomed; - FontMeasurements(); - void ClearMeasurements(); + FontMeasurements() noexcept; + void ClearMeasurements() noexcept; }; /** @@ -84,7 +84,7 @@ public: bool visible_, bool changeable_, bool hotspot_); void ClearTo(const Style &source); void Copy(Font &font_, const FontMeasurements &fm_); - bool IsProtected() const { return !(changeable && visible);} + bool IsProtected() const noexcept { return !(changeable && visible);} }; } |