fix warnings (signed/unsigned, initialization order, parens)

git-svn-id: http://skia.googlecode.com/svn/trunk@1724 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-06-27 14:47:50 +00:00
Родитель 5667afc5cb
Коммит 67908f2fae
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -116,7 +116,7 @@ static uint32_t DrawOp_packOpFlagData(DrawOps op, unsigned flags, unsigned data)
SkASSERT(0 == (flags & ~DRAWOPS_FLAG_MASK));
SkASSERT(0 == (data & ~DRAWOPS_DATA_MASK));
return (op << DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS) |
return (op << (DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS)) |
(flags << DRAWOPS_DATA_BITS) |
data;
}
@ -187,14 +187,14 @@ static unsigned PaintOp_unpackData(uint32_t op32) {
static uint32_t PaintOp_packOp(PaintOps op) {
SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS);
return op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS);
}
static uint32_t PaintOp_packOpData(PaintOps op, unsigned data) {
SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK));
return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS) | data;
return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | data;
}
static uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned data) {
@ -202,7 +202,7 @@ static uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned dat
SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK));
SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK));
return (op << PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS) |
return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) |
(flags << PAINTOPS_DATA_BITS) |
data;
}

Просмотреть файл

@ -85,7 +85,7 @@ public:
return fFlatArray[index - 1];
}
void defFlattenable(PaintFlats pf, unsigned index) {
void defFlattenable(PaintFlats pf, int index) {
SkASSERT(index == fFlatArray.count() + 1);
SkFlattenable* obj = fReader->readFlattenable();
*fFlatArray.append() = obj;

Просмотреть файл

@ -238,7 +238,8 @@ int SkGPipeCanvas::flattenToIndex(SkFlattenable* obj, PaintFlats paintflat) {
SkGPipeCanvas::SkGPipeCanvas(SkGPipeController* controller,
SkWriter32* writer, SkFactorySet* fset)
: fWriter(*writer), fFactorySet(fset) {
: fWriter(*writer) {
fFactorySet = fset;
fController = controller;
fDone = false;
fBlockSize = 0; // need first block from controller