From 91be374beb6e264e3b16cb056b15a4f7664f0877 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 19 Aug 2020 06:02:46 +0300 Subject: [PATCH] turn condition into assert in qt_get_hex_rgb() Signed-off-by: Ivailo Monev --- src/gui/painting/qcolor_p.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/painting/qcolor_p.cpp b/src/gui/painting/qcolor_p.cpp index a822d049a..5338e1358 100644 --- a/src/gui/painting/qcolor_p.cpp +++ b/src/gui/painting/qcolor_p.cpp @@ -60,8 +60,7 @@ static inline int hex2int(char s) bool qt_get_hex_rgb(const char *name, const int length, QRgb *rgb) { - if(name[0] != '#') - return false; + Q_ASSERT(name[0] == '#'); name++; const int len = (length - 1); int r, g, b; -- 2.11.0