From b7feb98aaa77bbdec60f46be1875e777d980a13c Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 19 Dec 2019 19:59:37 -0800 Subject: [PATCH] minor --- src/Makefile | 4 ++++ src/dataimpl.h | 1 - src/pvxs/data.h | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 046139f..76c5f03 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,6 +20,10 @@ USR_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden #USR_CXXFLAGS_Linux += -gz=zlib #USR_LDFLAGS_Linux += -Wl,--compress-debug-sections=zlib +# LTO takes a nice chunk out of the .so text size, but blows up the .a +#USR_CXXFLAGS += -flto +#USR_LDFLAGS += -flto + # fault on any undefined symbols (eg. from missing LIB_SYS_LIBS) USR_LDFLAGS_Linux += -Wl,--no-undefined -Wl,--no-allow-shlib-undefined diff --git a/src/dataimpl.h b/src/dataimpl.h index 6327bfe..2141192 100644 --- a/src/dataimpl.h +++ b/src/dataimpl.h @@ -141,7 +141,6 @@ struct StructTop { // empty, or the field of a structure which encloses this. Value enclosing; }; -static_assert (std::is_standard_layout{}, "Needed for offsetof()"); using Type = std::shared_ptr; diff --git a/src/pvxs/data.h b/src/pvxs/data.h index 4aab8ed..56b958b 100644 --- a/src/pvxs/data.h +++ b/src/pvxs/data.h @@ -356,6 +356,7 @@ public: //! copy values from other. Must have matching types. // Value& assign(const Value&); + //! Use to allocate members for an array of Struct and array of Union Value allocMember(); //! Does this Value actual reference some underlying storage @@ -381,7 +382,7 @@ public: //! test for instance equality. inline bool compareInst(const Value& o) { return store==o.store; } // int compareValue(const Value&); -// int compareType(const Value&); + inline int compareType(const Value& o) { return desc==o.desc; } // access to Value's ... value // not for Struct