diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-24 09:24:44 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-24 09:24:44 +1000 |
commit | bbfd34adc0e800ae2feec487a3c407873bb289e3 (patch) | |
tree | 06e19116e923a7ae0005070e1d9a695e5b212878 /src/XPM.cxx | |
parent | 70c14b70b935ae8b0656df0c8b7c64b481feea18 (diff) | |
download | scintilla-mirror-bbfd34adc0e800ae2feec487a3c407873bb289e3.tar.gz |
Fix warnings. Add const, constexpr, and noexcept. Initialize. Standard methods.
Replace 0 and NULL with nullptr for COM, DirectWrite and least ambiguous cases.
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r-- | src/XPM.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx index 0d4a2a068..5df3ea7c9 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -58,9 +58,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); } |