aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceAllocator.h
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-05-28 13:35:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-30 18:54:38 +0000
commit5d1adbfae9ee59051f564c004b1097f845fad324 (patch)
treee3ff48fe119a1df78218a1618e4f7bb4d18102ba /src/gpu/GrResourceAllocator.h
parent342480e46657754b0121031000b4c0a6d1b50890 (diff)
Make sk_sp operator bool explicit.
The sk_sp class has been using the operator pointer to field as a c++98 version of explicit operator bool. This change updates this class to use explicit operator bool. The one visible change is that the pointer to field version isn't quite as explcit, requiring code changes for some users. Change-Id: Iddf8fb347b1d3ec33db1af08489c9fd885c9bf08 Reviewed-on: https://skia-review.googlesource.com/130380 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu/GrResourceAllocator.h')
-rw-r--r--src/gpu/GrResourceAllocator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrResourceAllocator.h b/src/gpu/GrResourceAllocator.h
index 427ff327cb..e71e3558c2 100644
--- a/src/gpu/GrResourceAllocator.h
+++ b/src/gpu/GrResourceAllocator.h
@@ -137,7 +137,7 @@ private:
}
void assign(sk_sp<GrSurface>);
- bool wasAssignedSurface() const { return fAssignedSurface; }
+ bool wasAssignedSurface() const { return fAssignedSurface != nullptr; }
sk_sp<GrSurface> detachSurface() { return std::move(fAssignedSurface); }
// for SkTDynamicHash