aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/XPM.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-24 09:24:44 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-24 09:24:44 +1000
commit9b2941ea45ed3de51c660008f75b8d15ce18cca5 (patch)
tree16df3f0e9077887d0294c909d6fe60d72a9213a2 /src/XPM.cxx
parent083e04becbb7676dc1f699e81cff61490799e21b (diff)
downloadscintilla-mirror-9b2941ea45ed3de51c660008f75b8d15ce18cca5.tar.gz
Backport: Fix warnings. Add const, constexpr, and noexcept. Initialize. Standard methods.
Replace 0 and NULL with nullptr for COM, DirectWrite and least ambiguous cases. Backport of changeset 6974:e99161ef7bdd.
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r--src/XPM.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx
index b2cb6776a..6de9ce98b 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -57,9 +57,9 @@ unsigned int ValueOfHex(const char ch) noexcept {
}
ColourDesired ColourFromHex(const char *val) noexcept {
- unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]);
- unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]);
- unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]);
+ const unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]);
+ const unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]);
+ const unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]);
return ColourDesired(r, g, b);
}