From 9b2941ea45ed3de51c660008f75b8d15ce18cca5 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 24 May 2018 09:24:44 +1000 Subject: 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. --- src/XPM.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/XPM.cxx') 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); } -- cgit v1.2.3