diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-07 19:33:41 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-07 19:33:41 +0000 |
commit | 9f469749bf85e4368520087f33d19d221f3a1285 (patch) | |
tree | 67166d939d6829ac5f0689d4d43603688451d394 /src/record | |
parent | a60d0370b11b2905059be9f6d84b09da7ee2b4fb (diff) |
Revert of Statically initialize those zero-size singletons. (https://codereview.chromium.org/270353003/)
Reason for revert:
breaks windows bots
Original issue's description:
> Statically initialize those zero-size singletons.
>
> This way GCC/Clang don't generate the magic static code to call the
> pointless T::T() once in a threadsafe way. = {} is plenty initialized.
>
> BUG=skia:2378
>
> Committed: http://code.google.com/p/skia/source/detail?r=14623
R=bungeman@google.com, mtklein@chromium.org
TBR=bungeman@google.com, mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:2378
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/270363005
git-svn-id: http://skia.googlecode.com/svn/trunk@14625 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/record')
-rw-r--r-- | src/record/SkRecord.h | 2 | ||||
-rw-r--r-- | src/record/SkRecords.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/record/SkRecord.h b/src/record/SkRecord.h index 068155e47f..ccfa1dd556 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; } diff --git a/src/record/SkRecords.h b/src/record/SkRecords.h index d4b6852d70..bfa15496f3 100644 --- a/src/record/SkRecords.h +++ b/src/record/SkRecords.h @@ -63,6 +63,7 @@ enum Type { SK_RECORD_TYPES(ENUM) }; #define RECORD0(T) \ struct T { \ static const Type kType = T##_Type; \ + T() {} \ }; // We try to be flexible about the types the constructors take. Instead of requring the exact type |