Was good idea, but with C++ types with constructor/destructor, was getting in
the way as compiler was destructing those items where it was not desired.
Since C++ does not allow zero-sized arrays, just remove it...
Not needed. We get it in our config.h automatically thanks to
AC_USE_SYSTEM_EXTENSIONS. Let's see whose build it breaks...
If we end up putting it back, we should add other things from
that macro and remove the macro.
Disable copy/assign on them, as they shouldn't.
Make constructor / destructor call init_shallow/fini_shallow,
and make those idempotent. So, these three can be constructed
on stack now and no init/fini call is needed. As such,
hb_auto_t<> is not needed anymore. I'll remove that separately.
Newer compilers / language allows structs with constructor in union.
So, this was not actually testing anything. Indeed, the recent
change in DISALLOW_COPY *is* making some of our types non-POD.
That broke some bots.
Just remove this since it wasn't doing much, and I'd rather have
DISALLOW_COPY.
Finally! Catches hard-to-find errors like this:
- const SortedArrayOf<SVGDocumentIndexEntry> docs = this+svgDocEntries;
+ const SortedArrayOf<SVGDocumentIndexEntry> &docs = this+svgDocEntries;
We implement this for our array types. This, in turn, trickles down
into all types that embed the arrays. So, as long as we define all
open-ended structs in terms of Array types (all can be done using
UnsizedArrayOf), this achieves the goal of making uncopyable all
structs that are variable-sized. Yay!
Instead of passing a CFLAG/CXXFLAG to define HB_EXTERN, define it
directly in src/hb.hh as __declspec(dllexport) extern when we are
building HarfBuzz as DLLs on Visual Studio. Define HB_INTERNAL
as nothing without defining HB_NO_VISIBILITY when building HarfBuzz as
DLLs to avoid linker errors on Visual Studio builds.
Also "install" harfbuzz-subset.dll into $(PREFIX)\bin as the
hb-subset utility will depend on that DLL at runtime, when HarfBuzz is
built as DLLs. Since it consists of private APIs that are subject to
change, we do not install its headers nor .lib file.
Some clang versions define static_assert as a macro apparently, so we cannot
redefine it...
This reverts commit 94bfea0ce6.
This reverts commit 4e62627831.