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

Unified Diff: src/record/SkRecord.h

Issue 270353003: Statically initialize those zero-size singletons. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable warning Created 6 years, 7 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 | « gyp/common_conditions.gypi ('k') | src/record/SkRecords.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/record/SkRecord.h
diff --git a/src/record/SkRecord.h b/src/record/SkRecord.h
index ccfa1dd556441011df4c17f2ff827f560d064f4d..068155e47fa439d0905f01bb10317adc95a98b02 100644
--- a/src/record/SkRecord.h
+++ b/src/record/SkRecord.h
@@ -167,7 +167,7 @@ private:
// We could just return NULL but it's sort of confusing to return NULL on success.
template <typename T>
SK_WHEN(SkTIsEmpty<T>, T*) allocCommand() {
- static T singleton;
+ static T singleton = {};
return &singleton;
}
« no previous file with comments | « gyp/common_conditions.gypi ('k') | src/record/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698