Replace nil -> NULL in the views code.
Review URL: http://codereview.appspot.com/67139
git-svn-id: http://skia.googlecode.com/svn/trunk@200 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/views/SkWidgets.cpp b/src/views/SkWidgets.cpp
index fe87cd6..dba9ab3 100644
--- a/src/views/SkWidgets.cpp
+++ b/src/views/SkWidgets.cpp
@@ -65,7 +65,7 @@
if (!fAnimators[i]->decodeURI(path.c_str()))
{
delete fAnimators[i];
- fAnimators[i] = nil;
+ fAnimators[i] = NULL;
}
}
}
@@ -81,11 +81,11 @@
static SkAnimator* get_skin_animator(SkinType st)
{
#if 0
- if (gSkinSuite == nil)
+ if (gSkinSuite == NULL)
gSkinSuite = new SkinSuite;
return gSkinSuite->get(st);
#else
- return nil;
+ return NULL;
#endif
}
@@ -102,7 +102,7 @@
void SkWidget::onEnabledChange()
{
- this->inval(nil);
+ this->inval(NULL);
}
void SkWidget::postWidgetEvent()
@@ -123,7 +123,7 @@
{
this->INHERITED::onInflate(dom, node);
- if ((node = dom.getFirstChild(node, "event")) != nil)
+ if ((node = dom.getFirstChild(node, "event")) != NULL)
fEvent.inflate(dom, node);
}
@@ -189,7 +189,7 @@
void SkButtonWidget::onButtonStateChange()
{
- this->inval(nil);
+ this->inval(NULL);
}
void SkButtonWidget::onInflate(const SkDOM& dom, const SkDOM::Node* node)
@@ -284,7 +284,7 @@
p.setColor(SK_ColorBLUE);
create_emboss(&p, SkIntToScalar(12)/5, this->hasFocus(), this->getButtonState() == kOn_State);
canvas->drawRoundRect(r, SkScalarHalf(this->height()), SkScalarHalf(this->height()), p);
- p.setMaskFilter(nil);
+ p.setMaskFilter(NULL);
p.setTextAlign(SkPaint::kCenter_Align);
@@ -342,7 +342,7 @@
{
if (fMode == kAutoWidth_Mode)
{
- SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), nil, nil);
+ SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), NULL, NULL);
this->setWidth(width + fMargin.fX * 2);
}
else if (fMode == kAutoHeight_Mode)
@@ -351,7 +351,7 @@
int lines = width > 0 ? SkTextLineBreaker::CountLines(fText.c_str(), fText.size(), fPaint, width) : 0;
SkScalar before, after;
- (void)fPaint.measureText(0, nil, &before, &after);
+ (void)fPaint.measureText(0, NULL, &before, &after);
this->setHeight(lines * (after - before) + fMargin.fY * 2);
}
@@ -371,7 +371,7 @@
void SkStaticTextView::setSpacingAlign(SkTextBox::SpacingAlign align)
{
fSpacingAlign = SkToU8(align);
- this->inval(nil);
+ this->inval(NULL);
}
void SkStaticTextView::getMargin(SkPoint* margin) const
@@ -386,7 +386,7 @@
{
fMargin.set(dx, dy);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
@@ -420,7 +420,7 @@
{
fText.set(text, len);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
@@ -436,7 +436,7 @@
{
fPaint = paint;
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
@@ -480,7 +480,7 @@
if (text)
this->setText(text);
- if ((node = dom.getFirstChild(node, "paint")) != nil)
+ if ((node = dom.getFirstChild(node, "paint")) != NULL)
SkPaint_Inflate(&fPaint, dom, node);
}