aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Style.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-04-07 11:21:05 +1000
committerNeil <nyamatongwe@gmail.com>2020-04-07 11:21:05 +1000
commit2ebe1a97728f3d29671b3312e395bf0fb880caa6 (patch)
tree003cab55cba81d506cc258951849ce9dd9cf692e /src/Style.cxx
parentce31c41db1ae2be0f0f3186c94eb8bc4a93b260c (diff)
downloadscintilla-mirror-2ebe1a97728f3d29671b3312e395bf0fb880caa6.tar.gz
Backport: Use noexcept and const where possible.
Backport of changeset 8128:e56cf725d51c.
Diffstat (limited to 'src/Style.cxx')
-rw-r--r--src/Style.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Style.cxx b/src/Style.cxx
index b5f8ca091..d3668be6d 100644
--- a/src/Style.cxx
+++ b/src/Style.cxx
@@ -80,7 +80,7 @@ Style::Style() : FontSpecification() {
SC_WEIGHT_NORMAL, false, false, false, caseMixed, true, true, false);
}
-Style::Style(const Style &source) : FontSpecification(), FontMeasurements() {
+Style::Style(const Style &source) noexcept : FontSpecification(), FontMeasurements() {
Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff),
0, nullptr, 0,
SC_WEIGHT_NORMAL, false, false, false, caseMixed, true, true, false);
@@ -102,7 +102,7 @@ Style::Style(const Style &source) : FontSpecification(), FontMeasurements() {
Style::~Style() {
}
-Style &Style::operator=(const Style &source) {
+Style &Style::operator=(const Style &source) noexcept {
if (this == &source)
return * this;
Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff),
@@ -127,7 +127,7 @@ void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_,
const char *fontName_, int characterSet_,
int weight_, bool italic_, bool eolFilled_,
bool underline_, ecaseForced caseForce_,
- bool visible_, bool changeable_, bool hotspot_) {
+ bool visible_, bool changeable_, bool hotspot_) noexcept {
fore = fore_;
back = back_;
characterSet = characterSet_;
@@ -145,7 +145,7 @@ void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_,
FontMeasurements::ClearMeasurements();
}
-void Style::ClearTo(const Style &source) {
+void Style::ClearTo(const Style &source) noexcept {
Clear(
source.fore,
source.back,
@@ -162,7 +162,7 @@ void Style::ClearTo(const Style &source) {
source.hotspot);
}
-void Style::Copy(Font &font_, const FontMeasurements &fm_) {
+void Style::Copy(const Font &font_, const FontMeasurements &fm_) noexcept {
font.MakeAlias(font_);
(FontMeasurements &)(*this) = fm_;
}