diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-09 13:52:16 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-09 18:03:08 (GMT) |
commit | 500f28f04a08e37525e3d1deb5cfe6e908c66b15 (patch) | |
tree | 0686bf140bb0337917744e10daa66677c6b5cda2 /src/gui/painting/qdrawhelper_p.h | |
parent | 43f76aaa733f66895fd672a9243e950d410ef918 (diff) | |
download | Qt-500f28f04a08e37525e3d1deb5cfe6e908c66b15.zip Qt-500f28f04a08e37525e3d1deb5cfe6e908c66b15.tar.gz Qt-500f28f04a08e37525e3d1deb5cfe6e908c66b15.tar.bz2 |
Refactor comp_func_solid_Clear() and comp_func_solid_Source()
Put the common code together with a #define.
Remove the check for the length from comp_func_Clear_impl and
move it to qt_memfill()
Diffstat (limited to 'src/gui/painting/qdrawhelper_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 6c47aac..cb0db4f 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1549,6 +1549,9 @@ template<> inline void qt_memfill(quint8 *dest, quint8 color, int count) template <class T> inline void qt_memfill(T *dest, T value, int count) { + if (!count) + return; + int n = (count + 7) / 8; switch (count & 0x07) { |