Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
diff --git a/tools/VisualBench/VisualBench.cpp b/tools/VisualBench/VisualBench.cpp
index 0763d5c..ae3526b 100644
--- a/tools/VisualBench/VisualBench.cpp
+++ b/tools/VisualBench/VisualBench.cpp
@@ -56,7 +56,7 @@
, fFlushes(1)
, fLoops(1)
, fState(kPreWarmLoops_State)
- , fBenchmark(NULL)
+ , fBenchmark(nullptr)
, fResults(new ResultsWriter) {
SkCommandLineFlags::Parse(argc, argv);
@@ -123,7 +123,7 @@
}
void VisualBench::resetContext() {
- fSurface.reset(NULL);
+ fSurface.reset(nullptr);
fInterface.reset(GrGLCreateNativeInterface());
SkASSERT(fInterface);
@@ -266,7 +266,7 @@
}
// Invalidate the window to force a redraw. Poor man's animation mechanism.
- this->inval(NULL);
+ this->inval(nullptr);
}
inline double VisualBench::elapsed() {
@@ -311,7 +311,7 @@
void VisualBench::postDraw(SkCanvas* canvas) {
fBenchmark->perCanvasPostDraw(canvas);
- fBenchmark.reset(NULL);
+ fBenchmark.reset(nullptr);
fCurrentSample = 0;
fFlushes = 1;
fLoops = 1;
diff --git a/tools/VisualBench/VisualBenchmarkStream.cpp b/tools/VisualBench/VisualBenchmarkStream.cpp
index f8d01a1..4cc819d 100644
--- a/tools/VisualBench/VisualBenchmarkStream.cpp
+++ b/tools/VisualBench/VisualBenchmarkStream.cpp
@@ -13,7 +13,7 @@
#include "SkStream.h"
#include "VisualSKPBench.h"
-DEFINE_string2(match, m, NULL,
+DEFINE_string2(match, m, nullptr,
"[~][^]substring[$] [...] of bench name to run.\n"
"Multiple matches may be separated by spaces.\n"
"~ causes a matching bench to always be skipped\n"
@@ -27,8 +27,8 @@
VisualBenchmarkStream::VisualBenchmarkStream()
: fBenches(BenchRegistry::Head())
, fGMs(skiagm::GMRegistry::Head())
- , fSourceType(NULL)
- , fBenchType(NULL)
+ , fSourceType(nullptr)
+ , fBenchType(nullptr)
, fCurrentSKP(0) {
for (int i = 0; i < FLAGS_skps.count(); i++) {
if (SkStrEndsWith(FLAGS_skps[i], ".skp")) {
@@ -51,13 +51,13 @@
}
SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
- if (stream.get() == NULL) {
+ if (stream.get() == nullptr) {
SkDebugf("Could not read %s.\n", path);
return false;
}
pic->reset(SkPicture::CreateFromStream(stream.get()));
- if (pic->get() == NULL) {
+ if (pic->get() == nullptr) {
SkDebugf("Could not read %s as an SkPicture.\n", path);
return false;
}
@@ -77,7 +77,7 @@
Benchmark* VisualBenchmarkStream::innerNext() {
while (fBenches) {
- Benchmark* bench = fBenches->factory()(NULL);
+ Benchmark* bench = fBenches->factory()(nullptr);
fBenches = fBenches->next();
if (bench->isVisual()) {
fSourceType = "bench";
@@ -88,7 +88,7 @@
}
while (fGMs) {
- SkAutoTDelete<skiagm::GM> gm(fGMs->factory()(NULL));
+ SkAutoTDelete<skiagm::GM> gm(fGMs->factory()(nullptr));
fGMs = fGMs->next();
if (gm->runAsBench()) {
fSourceType = "gm";
@@ -111,5 +111,5 @@
return new VisualSKPBench(name.c_str(), pic.get());
}
- return NULL;
+ return nullptr;
}