Skip to content

Commit

Permalink
GCC gets worried when we memset Stats
Browse files Browse the repository at this point in the history
... because it has a constructor, implied by all the initializers.
Luckily, that constructor does exactly what our memset() does.

Change-Id: Ibe538e9d840de9e6fd07d673783709df17b7b4fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258447
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
  • Loading branch information
Mike Klein authored and Skia Commit-Bot committed Dec 6, 2019
1 parent 0483b46 commit 3e01360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/skottie/src/Skottie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ sk_sp<Animation> Animation::Builder::make(const char* data, size_t data_len) {
auto resolvedProvider = fResourceProvider
? fResourceProvider : sk_make_sp<NullResourceProvider>();

memset(&fStats, 0, sizeof(struct Stats));
fStats = Stats{};

fStats.fJsonSize = data_len;
const auto t0 = std::chrono::steady_clock::now();
Expand Down

0 comments on commit 3e01360

Please sign in to comment.