~uriboni/compiz/unminimize-configurable-independently

« back to all changes in this revision

Viewing changes to kde/window-decorator-kde4/window.cpp

Fixed various problems described in bug 1030473.
Optimized performance and style following suggestions reported by cppcheck:

1. Reduced the scope of various variables.

2. Used prefix ++ operators for non-primitive types, because those can be more efficient than post-increment. Post-increment usually keeps a copy of the previous value, adds extra code and is slower.. Fixes: https://bugs.launchpad.net/bugs/1030473. Approved by Daniel van Vugt, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1150
1150
    unsigned int    frameType = 0xffffff;
1151
1151
    unsigned int    frameState = 0;
1152
1152
    unsigned int    frameActions = 0;
1153
 
    int             nQuad = 0;
1154
1153
    int             left, right, top, bottom, width, height;
1155
1154
    unsigned int    saveState;
1156
1155
    bool            allocated = false;
1204
1203
 
1205
1204
    if (mType != Normal2D)
1206
1205
    {
 
1206
      int nQuad = 0;
1207
1207
      if (!data)
1208
1208
      {
1209
1209
          allocated = true;