equal
deleted
inserted
replaced
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 ** |
142 } |
142 } |
143 |
143 |
144 static int calc_shift(int mask) |
144 static int calc_shift(int mask) |
145 { |
145 { |
146 int result = 0; |
146 int result = 0; |
147 while (!(mask & 1)) { |
147 while (mask && !(mask & 1)) { |
148 result++; |
148 result++; |
149 mask >>= 1; |
149 mask >>= 1; |
150 } |
150 } |
151 return result; |
151 return result; |
152 } |
152 } |