From 7e61891c09d2b1ae0f64e17e5582d2bafb2f202f Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sun, 10 Jun 2018 17:41:51 -0600 Subject: [PATCH] general: Fix more DLL linkage and EXPCL_PANDA_ macros --- panda/src/gobj/shader.h | 2 +- panda/src/pgraph/cullBin.h | 2 +- panda/src/pgraphnodes/lodNode.h | 2 +- panda/src/pgraphnodes/lodNodeType.h | 4 ++-- panda/src/pgraphnodes/uvScrollNode.h | 2 +- panda/src/pnmimage/config_pnmimage.h | 10 +++++----- panda/src/pnmimage/ppmcmap.h | 12 ++++++------ panda/src/pnmimagetypes/pnmFileTypePfm.h | 2 +- panda/src/pstatclient/pStatClient.h | 2 +- panda/src/pstatclient/pStatTimer.h | 2 +- panda/src/putil/bamReader.cxx | 7 ------- panda/src/putil/bamReader.h | 2 +- panda/src/text/config_text.h | 4 ++-- 13 files changed, 23 insertions(+), 30 deletions(-) diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 98734dfe50..8e65c005e9 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -436,7 +436,7 @@ public: ShaderPtrType _type; }; - class ShaderCaps { + class EXPCL_PANDA_GOBJ ShaderCaps { public: void clear(); INLINE bool operator == (const ShaderCaps &other) const; diff --git a/panda/src/pgraph/cullBin.h b/panda/src/pgraph/cullBin.h index e3a2ccca55..7a104d1f3b 100644 --- a/panda/src/pgraph/cullBin.h +++ b/panda/src/pgraph/cullBin.h @@ -74,7 +74,7 @@ protected: GraphicsStateGuardianBase *_gsg; // Used in make_result_graph() and fill_result_graph(). - class ResultGraphBuilder { + class EXPCL_PANDA_PGRAPH ResultGraphBuilder { public: ResultGraphBuilder(PandaNode *root_node); void add_object(CullableObject *object); diff --git a/panda/src/pgraphnodes/lodNode.h b/panda/src/pgraphnodes/lodNode.h index c82e066ffc..b7b58dca85 100644 --- a/panda/src/pgraphnodes/lodNode.h +++ b/panda/src/pgraphnodes/lodNode.h @@ -161,7 +161,7 @@ protected: typedef pvector SwitchVector; private: - class EXPCL_PANDA_PGRAPH CData : public CycleData { + class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { public: INLINE CData(); INLINE CData(const CData ©); diff --git a/panda/src/pgraphnodes/lodNodeType.h b/panda/src/pgraphnodes/lodNodeType.h index 507ade03cf..ec1dec820b 100644 --- a/panda/src/pgraphnodes/lodNodeType.h +++ b/panda/src/pgraphnodes/lodNodeType.h @@ -25,7 +25,7 @@ enum LODNodeType { END_PUBLISH -EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, LODNodeType lnt); -EXPCL_PANDA_PGRAPH std::istream &operator >> (std::istream &in, LODNodeType &cs); +EXPCL_PANDA_PGRAPHNODES std::ostream &operator << (std::ostream &out, LODNodeType lnt); +EXPCL_PANDA_PGRAPHNODES std::istream &operator >> (std::istream &in, LODNodeType &cs); #endif diff --git a/panda/src/pgraphnodes/uvScrollNode.h b/panda/src/pgraphnodes/uvScrollNode.h index ac4c29b643..51ab828130 100644 --- a/panda/src/pgraphnodes/uvScrollNode.h +++ b/panda/src/pgraphnodes/uvScrollNode.h @@ -23,7 +23,7 @@ /** * This node is placed at key points within the scene graph to animate uvs. */ -class EXPCL_PANDA_PGRAPH UvScrollNode : public PandaNode { +class EXPCL_PANDA_PGRAPHNODES UvScrollNode : public PandaNode { PUBLISHED: INLINE explicit UvScrollNode(const std::string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); INLINE explicit UvScrollNode(const std::string &name); diff --git a/panda/src/pnmimage/config_pnmimage.h b/panda/src/pnmimage/config_pnmimage.h index 9ff40dd5a0..f5f6c029bb 100644 --- a/panda/src/pnmimage/config_pnmimage.h +++ b/panda/src/pnmimage/config_pnmimage.h @@ -21,11 +21,11 @@ NotifyCategoryDecl(pnmimage, EXPCL_PANDA_PNMIMAGE, EXPTP_PANDA_PNMIMAGE); -extern ConfigVariableBool pfm_force_littleendian; -extern ConfigVariableBool pfm_reverse_dimensions; -extern ConfigVariableBool pfm_resize_gaussian; -extern ConfigVariableBool pfm_resize_quick; -extern ConfigVariableDouble pfm_resize_radius; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_force_littleendian; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_reverse_dimensions; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_resize_gaussian; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableBool pfm_resize_quick; +extern EXPCL_PANDA_PNMIMAGE ConfigVariableDouble pfm_resize_radius; extern EXPCL_PANDA_PNMIMAGE void init_libpnmimage(); diff --git a/panda/src/pnmimage/ppmcmap.h b/panda/src/pnmimage/ppmcmap.h index f8b9966818..5466de04e7 100644 --- a/panda/src/pnmimage/ppmcmap.h +++ b/panda/src/pnmimage/ppmcmap.h @@ -26,7 +26,7 @@ struct colorhist_list_item EXPCL_PANDA_PNMIMAGE colorhist_vector ppm_computecolorhist( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); /* Returns a colorhist *colorsP long (with space allocated for maxcolors. */ -void ppm_addtocolorhist ( colorhist_vector chv, int* colorsP, int maxcolors, pixel* colorP, int value, int position ); +EXPCL_PANDA_PNMIMAGE void ppm_addtocolorhist ( colorhist_vector chv, int* colorsP, int maxcolors, pixel* colorP, int value, int position ); EXPCL_PANDA_PNMIMAGE void ppm_freecolorhist( colorhist_vector chv ); @@ -35,19 +35,19 @@ EXPCL_PANDA_PNMIMAGE void ppm_freecolorhist( colorhist_vector chv ); typedef colorhist_list* colorhash_table; -colorhash_table ppm_computecolorhash ( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); +EXPCL_PANDA_PNMIMAGE colorhash_table ppm_computecolorhash ( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP ); EXPCL_PANDA_PNMIMAGE int ppm_lookupcolor( colorhash_table cht, pixel* colorP ); -colorhist_vector ppm_colorhashtocolorhist ( colorhash_table cht, int maxcolors ); +EXPCL_PANDA_PNMIMAGE colorhist_vector ppm_colorhashtocolorhist ( colorhash_table cht, int maxcolors ); EXPCL_PANDA_PNMIMAGE colorhash_table ppm_colorhisttocolorhash( colorhist_vector chv, int colors ); -int ppm_addtocolorhash ( colorhash_table cht, pixel* colorP, int value ); +EXPCL_PANDA_PNMIMAGE int ppm_addtocolorhash ( colorhash_table cht, pixel* colorP, int value ); /* Returns -1 on failure. */ -colorhash_table ppm_alloccolorhash ( void ); +EXPCL_PANDA_PNMIMAGE colorhash_table ppm_alloccolorhash ( void ); -void ppm_freecolorhash( colorhash_table cht ); +EXPCL_PANDA_PNMIMAGE void ppm_freecolorhash( colorhash_table cht ); #endif diff --git a/panda/src/pnmimagetypes/pnmFileTypePfm.h b/panda/src/pnmimagetypes/pnmFileTypePfm.h index aa41adb1df..ab18685084 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePfm.h +++ b/panda/src/pnmimagetypes/pnmFileTypePfm.h @@ -25,7 +25,7 @@ * For reading and writing PFM files using the basic PNMImage interface, as if * they were basic RGB files. */ -class EXPCL_PANDA_PNMIMAGE PNMFileTypePfm : public PNMFileType { +class EXPCL_PANDA_PNMIMAGETYPES PNMFileTypePfm : public PNMFileType { public: PNMFileTypePfm(); diff --git a/panda/src/pstatclient/pStatClient.h b/panda/src/pstatclient/pStatClient.h index 8ee255613b..bdcdb4eb20 100644 --- a/panda/src/pstatclient/pStatClient.h +++ b/panda/src/pstatclient/pStatClient.h @@ -169,7 +169,7 @@ private: // This is where the meat of the Collector data is stored. (All the stuff // in PStatCollector and PStatCollectorDef is just fluff.) - class Collector { + class EXPCL_PANDA_PSTATCLIENT Collector { public: INLINE Collector(int parent_index, const std::string &name); INLINE int get_parent_index() const; diff --git a/panda/src/pstatclient/pStatTimer.h b/panda/src/pstatclient/pStatTimer.h index b7a32f27e2..4cfca5a7d2 100644 --- a/panda/src/pstatclient/pStatTimer.h +++ b/panda/src/pstatclient/pStatTimer.h @@ -27,7 +27,7 @@ class Thread; * and when the PStatTimer variable goes out of scope (for instance, at the * end of the function), it will automatically stop the Collector. */ -class EXPCL_PANDA_PSTATCLIENT PStatTimer { +class PStatTimer { public: #ifdef DO_PSTATS INLINE PStatTimer(PStatCollector &collector); diff --git a/panda/src/putil/bamReader.cxx b/panda/src/putil/bamReader.cxx index e6cc5683d6..a1b6641148 100644 --- a/panda/src/putil/bamReader.cxx +++ b/panda/src/putil/bamReader.cxx @@ -1544,10 +1544,3 @@ finalize() { } } } - -/** - * - */ -BamReader::AuxData:: -~AuxData() { -} diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index 84312ac4a6..69c901f0fa 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -228,7 +228,7 @@ public: class AuxData : public ReferenceCount { public: INLINE AuxData(); - virtual ~AuxData(); + virtual ~AuxData() = default; }; private: diff --git a/panda/src/text/config_text.h b/panda/src/text/config_text.h index 131b95809d..cf58c5c811 100644 --- a/panda/src/text/config_text.h +++ b/panda/src/text/config_text.h @@ -40,8 +40,8 @@ extern ConfigVariableBool text_small_caps; extern EXPCL_PANDA_TEXT ConfigVariableDouble text_small_caps_scale; extern ConfigVariableFilename text_default_font; extern EXPCL_PANDA_TEXT ConfigVariableDouble text_tab_width; -extern ConfigVariableInt text_push_properties_key; -extern ConfigVariableInt text_pop_properties_key; +extern EXPCL_PANDA_TEXT ConfigVariableInt text_push_properties_key; +extern EXPCL_PANDA_TEXT ConfigVariableInt text_pop_properties_key; extern ConfigVariableInt text_soft_hyphen_key; extern ConfigVariableInt text_soft_break_key; extern ConfigVariableInt text_embed_graphic_key;