Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: src/views/SkWidgets.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/views/SkViewPriv.cpp ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkWidgets.cpp
diff --git a/src/views/SkWidgets.cpp b/src/views/SkWidgets.cpp
index cde2b427389fad6c738289c1716ca2a471804764..fc0ffb82b6dc34bfe9da7dd385ad8c4760bf59d8 100644
--- a/src/views/SkWidgets.cpp
+++ b/src/views/SkWidgets.cpp
@@ -72,7 +72,7 @@ SkinSuite::SkinSuite()
if (!fAnimators[i]->decodeURI(path.c_str()))
{
delete fAnimators[i];
- fAnimators[i] = NULL;
+ fAnimators[i] = nullptr;
}
}
}
@@ -88,11 +88,11 @@ static SkinSuite* gSkinSuite;
static SkAnimator* get_skin_animator(SkinType st)
{
#if 0
- if (gSkinSuite == NULL)
+ if (gSkinSuite == nullptr)
gSkinSuite = new SkinSuite;
return gSkinSuite->get(st);
#else
- return NULL;
+ return nullptr;
#endif
}
@@ -109,7 +109,7 @@ void SkWidget::Term()
void SkWidget::onEnabledChange()
{
- this->inval(NULL);
+ this->inval(nullptr);
}
void SkWidget::postWidgetEvent()
@@ -130,7 +130,7 @@ void SkWidget::onInflate(const SkDOM& dom, const SkDOM::Node* node)
{
this->INHERITED::onInflate(dom, node);
- if ((node = dom.getFirstChild(node, "event")) != NULL)
+ if ((node = dom.getFirstChild(node, "event")) != nullptr)
fEvent.inflate(dom, node);
}
@@ -196,7 +196,7 @@ void SkButtonWidget::setButtonState(State state)
void SkButtonWidget::onButtonStateChange()
{
- this->inval(NULL);
+ this->inval(nullptr);
}
void SkButtonWidget::onInflate(const SkDOM& dom, const SkDOM::Node* node)
@@ -293,7 +293,7 @@ void SkPushButtonWidget::onDraw(SkCanvas* canvas)
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(NULL);
+ p.setMaskFilter(nullptr);
p.setTextAlign(SkPaint::kCenter_Align);
@@ -351,7 +351,7 @@ void SkStaticTextView::computeSize()
{
if (fMode == kAutoWidth_Mode)
{
- SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), NULL, NULL);
+ SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), nullptr, nullptr);
this->setWidth(width + fMargin.fX * 2);
}
else if (fMode == kAutoHeight_Mode)
@@ -360,7 +360,7 @@ void SkStaticTextView::computeSize()
int lines = width > 0 ? SkTextLineBreaker::CountLines(fText.c_str(), fText.size(), fPaint, width) : 0;
SkScalar before, after;
- (void)fPaint.measureText(0, NULL, &before, &after);
+ (void)fPaint.measureText(0, nullptr, &before, &after);
this->setHeight(lines * (after - before) + fMargin.fY * 2);
}
@@ -380,7 +380,7 @@ void SkStaticTextView::setMode(Mode mode)
void SkStaticTextView::setSpacingAlign(SkTextBox::SpacingAlign align)
{
fSpacingAlign = SkToU8(align);
- this->inval(NULL);
+ this->inval(nullptr);
}
void SkStaticTextView::getMargin(SkPoint* margin) const
@@ -395,7 +395,7 @@ void SkStaticTextView::setMargin(SkScalar dx, SkScalar dy)
{
fMargin.set(dx, dy);
this->computeSize();
- this->inval(NULL);
+ this->inval(nullptr);
}
}
@@ -429,7 +429,7 @@ void SkStaticTextView::setText(const char text[], size_t len)
{
fText.set(text, len);
this->computeSize();
- this->inval(NULL);
+ this->inval(nullptr);
}
}
@@ -445,7 +445,7 @@ void SkStaticTextView::setPaint(const SkPaint& paint)
{
fPaint = paint;
this->computeSize();
- this->inval(NULL);
+ this->inval(nullptr);
}
}
@@ -489,7 +489,7 @@ void SkStaticTextView::onInflate(const SkDOM& dom, const SkDOM::Node* node)
if (text)
this->setText(text);
- if ((node = dom.getFirstChild(node, "paint")) != NULL)
+ if ((node = dom.getFirstChild(node, "paint")) != nullptr)
SkPaint_Inflate(&fPaint, dom, node);
}
« no previous file with comments | « src/views/SkViewPriv.cpp ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698