summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-21 23:47:50 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-02 10:56:44 +0100
commit7b1f8df5fa8ea5346315f999097b19836d7eac19 (patch)
tree43410ab67969ee428dbe22f03b027c72358db669
parentd42b8e30e8ac2a33a877d37bd0ffbf616580d7fc (diff)
downloadqtxmlpatterns-7b1f8df5fa8ea5346315f999097b19836d7eac19.tar.gz
Fix annoying warning in qtxmlpatterns about a value too big for the enum
api/qcoloroutput_p.h:74:60: error: signed shift result (0xFFFFF00000) requires 41 bits to represent, but 'int' only has 32 bits [-Werror,-Wshift-overflow] The masks don't look right anyway. Let's just hardcode them according to how many colours are used. Change-Id: Idd3438ecab3fb666bd84929fb731011224b9c68e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--src/xmlpatterns/api/qcoloroutput_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlpatterns/api/qcoloroutput_p.h b/src/xmlpatterns/api/qcoloroutput_p.h
index 864b90d..f02a450 100644
--- a/src/xmlpatterns/api/qcoloroutput_p.h
+++ b/src/xmlpatterns/api/qcoloroutput_p.h
@@ -70,8 +70,8 @@ namespace QPatternist
ForegroundShift = 10,
BackgroundShift = 20,
SpecialShift = 20,
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
+ ForegroundMask = 0x1f << ForegroundShift,
+ BackgroundMask = 0x7 << BackgroundShift
};
public: