src/gui/painting/qdrawhelper_p.h
changeset 7 f7bc934e204c
parent 0 1918ee327afb
child 30 5dc02b23752f
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
  1547 }
  1547 }
  1548 
  1548 
  1549 template <class T>
  1549 template <class T>
  1550 inline void qt_memfill(T *dest, T value, int count)
  1550 inline void qt_memfill(T *dest, T value, int count)
  1551 {
  1551 {
       
  1552     if (!count)
       
  1553         return;
       
  1554 
  1552     int n = (count + 7) / 8;
  1555     int n = (count + 7) / 8;
  1553     switch (count & 0x07)
  1556     switch (count & 0x07)
  1554     {
  1557     {
  1555     case 0: do { *dest++ = value;
  1558     case 0: do { *dest++ = value;
  1556     case 7:      *dest++ = value;
  1559     case 7:      *dest++ = value;