int corners = 0;
SkPoint first, last;
- int firstDirection;
- int lastDirection;
- int nextDirection;
- bool closedOrMoved;
+ first.set(0, 0);
+ last.set(0, 0);
+ int firstDirection = 0;
+ int lastDirection = 0;
+ int nextDirection = 0;
+ bool closedOrMoved = false;
bool autoClose = false;
const uint8_t* verbs = fVerbs.begin();
const uint8_t* verbStop = fVerbs.end();
// Possible values for corners are 2, 3, and 4.
// When corners == 3, nextDirection opposes firstDirection.
// Otherwise, nextDirection at corner 2 opposes corner 4.
- int turn = firstDirection ^ corners - 1;
+ int turn = firstDirection ^ (corners - 1);
int directionCycle = 3 == corners ? 0 : nextDirection ^ turn;
if ((directionCycle ^ turn) != nextDirection) {
return false; // direction didn't follow cycle
SkSVGElement* child = *fChildren.begin();
SkASSERT(child->getType() == SkSVGType_Use);
SkSVGUse* use = (SkSVGUse*) child;
- SkSVGElement* ref;
+ SkSVGElement* ref = NULL;
const char* refStr = &use->f_xlink_href.c_str()[1];
SkASSERT(parser.getIDs().find(refStr, &ref));
SkASSERT(ref);
if ((index = dom.findList(node, "orient", "horizontal,vertical")) >= 0)
this->setOrient((Orient)index);
- else
+ else {
assert_no_attr(dom, node, "orient");
+ }
if (dom.findScalars(node, "margin", value, 4))
{
margin.set(value[0], value[1], value[2], value[3]);
this->setMargin(margin);
}
- else
+ else {
assert_no_attr(dom, node, "margin");
+ }
if (dom.findScalar(node, "spacer", value))
this->setSpacer(value[0]);
- else
+ else {
assert_no_attr(dom, node, "spacer");
+ }
if ((index = dom.findList(node, "pack", "start,center,end")) >= 0)
this->setPack((Pack)index);
- else
+ else {
assert_no_attr(dom, node, "pack");
+ }
if ((index = dom.findList(node, "align", "start,center,end,stretch")) >= 0)
this->setAlign((Align)index);
- else
+ else {
assert_no_attr(dom, node, "align");
+ }
}
///////////////////////////////////////////////////////////////////////////////////////////