aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkStream.h
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-28 10:34:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-28 17:48:57 +0000
commita93a14a99816d25b773f0b12868143702baf44bf (patch)
tree727e7cb88867bdc12cbcf8baa354ae3afc9444e2 /include/core/SkStream.h
parent695db408437807d049ecc02b3b852704092728f2 (diff)
Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include/core/SkStream.h')
-rw-r--r--include/core/SkStream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index 1862117bb6..fde6baf0c9 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -59,7 +59,7 @@ public:
* @return the actual number bytes that could be skipped.
*/
size_t skip(size_t size) {
- return this->read(NULL, size);
+ return this->read(nullptr, size);
}
/**
@@ -104,7 +104,7 @@ public:
/** Duplicates this stream. If this cannot be done, returns NULL.
* The returned stream will be positioned at the beginning of its data.
*/
- virtual SkStreamRewindable* duplicate() const { return NULL; }
+ virtual SkStreamRewindable* duplicate() const { return nullptr; }
//SkStreamSeekable
/** Returns true if this stream can report it's current position. */
@@ -127,7 +127,7 @@ public:
/** Duplicates this stream. If this cannot be done, returns NULL.
* The returned stream will be positioned the same as this stream.
*/
- virtual SkStreamSeekable* fork() const { return NULL; }
+ virtual SkStreamSeekable* fork() const { return nullptr; }
//SkStreamAsset
/** Returns true if this stream can report it's total length. */
@@ -138,7 +138,7 @@ public:
//SkStreamMemory
/** Returns the starting address for the data. If this cannot be done, returns NULL. */
//TODO: replace with virtual const SkData* getData()
- virtual const void* getMemoryBase() { return NULL; }
+ virtual const void* getMemoryBase() { return nullptr; }
};
/** SkStreamRewindable is a SkStream for which rewind and duplicate are required. */
@@ -373,7 +373,7 @@ public:
/** Returns true if the current path could be opened.
*/
- bool isValid() const { return fFILE != NULL; }
+ bool isValid() const { return fFILE != nullptr; }
bool write(const void* buffer, size_t size) override;
void flush() override;