~compiz-team/compiz/compiz.fix_1006335

« back to all changes in this revision

Viewing changes to plugins/grid/src/grid.h

  • Committer: Daniel van Vugt
  • Author(s): smspillaz
  • Date: 2012-05-28 06:08:02 UTC
  • mfrom: (3225.4.2 compiz.clang-warnings)
  • Revision ID: daniel.van.vugt@canonical.com-20120528060802-1nnxgrg2amsieb01
Fixes warnings that happen on clang. Clang picked up a number of things by
default, including:

1. Memset by the size of a pointer rather than by the struct itself
2. inline functions in header files declared only
3. needless casting (although a leaked KWinAdapter is just insane, not sure
   how to fix that ..)
4. Unnecessary checks for < 0 with unsigned int
5. Member methods hiding virtual functions because they were never overridden
   correclty
6. Unused isAncestorTo in decor
7. ; after if statement with block proceeding in some places
8. Incrementing a bool

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
typedef unsigned int GridType;
51
51
 
52
 
typedef struct _GridProps
 
52
class GridProps
53
53
{
 
54
public:
 
55
 
 
56
    GridProps () {}
 
57
 
 
58
    GridProps (int r, int d, int x, int y):
 
59
        gravityRight (r),
 
60
        gravityDown (d),
 
61
        numCellsX (x),
 
62
        numCellsY (y)
 
63
    {
 
64
    }
 
65
 
54
66
    int gravityRight;
55
67
    int gravityDown;
56
68
    int numCellsX;
57
69
    int numCellsY;
58
 
} GridProps;
 
70
};
59
71
 
60
72
enum Edges
61
73
{