Commit 4f3bead5 authored by Peter Kasting's avatar Peter Kasting
Browse files

Remove a static initializer by removing a global of non-POD type.

These are banned by the Google style guide, and Chromium has a hard
no-new-static-initializers policy preventing updating to a new version of
libprotobuf unless this is resolved.  This is the first such change, I'll need
to make at least one more in the future.

Luckily, the protobuf source tree already has an alternative to static
initializers in once.h; use that machinery instead.

I defined everything in the .cc file in a blob to replace the old implementation
rather than matching the .h layout precisely; let me know if a different
ordering is preferred.  I also eliminated the macro that used to be used here as
spelling everything out only takes one additional line, and the macro didn't
actually handle all details of using a particular member variable, just the
declaration, so it felt a bit error-prone.
parent 47210ccd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment