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

Unified Diff: include/utils/win/SkTScopedComPtr.h

Issue 2075913002: Revert of Support pixel antialising in DirectWrite. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | src/ports/SkFontMgr_win_dw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/win/SkTScopedComPtr.h
diff --git a/include/utils/win/SkTScopedComPtr.h b/include/utils/win/SkTScopedComPtr.h
index 58bf8733a4d8daa73b833ed175ed74236bf4fb5c..6fb6143adc71a74c4d74b9cc807921cfbadfa4e9 100644
--- a/include/utils/win/SkTScopedComPtr.h
+++ b/include/utils/win/SkTScopedComPtr.h
@@ -37,11 +37,11 @@
T *fPtr;
public:
- explicit SkTScopedComPtr(T *ptr = nullptr) : fPtr(ptr) { }
+ explicit SkTScopedComPtr(T *ptr = NULL) : fPtr(ptr) { }
~SkTScopedComPtr() {
this->reset();
}
- T &operator*() const { SkASSERT(fPtr != nullptr); return *fPtr; }
+ T &operator*() const { SkASSERT(fPtr != NULL); return *fPtr; }
SkBlockComRef<T> *operator->() const {
return static_cast<SkBlockComRef<T>*>(fPtr);
}
@@ -51,13 +51,12 @@
* Must only be used on instances currently pointing to NULL,
* and only to initialize the instance.
*/
- T **operator&() { SkASSERT(fPtr == nullptr); return &fPtr; }
- explicit operator bool() const { return fPtr != nullptr; }
+ T **operator&() { SkASSERT(fPtr == NULL); return &fPtr; }
T *get() const { return fPtr; }
void reset() {
if (this->fPtr) {
this->fPtr->Release();
- this->fPtr = nullptr;
+ this->fPtr = NULL;
}
}
@@ -69,7 +68,7 @@
T* release() {
T* temp = this->fPtr;
- this->fPtr = nullptr;
+ this->fPtr = NULL;
return temp;
}
};
« no previous file with comments | « no previous file | src/ports/SkFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698