Skip to content
Permalink
Browse files

general: Update EXPCL declarations to be MinGW-friendly (#792)

  • Loading branch information
Cerberus1746 authored and CFSworks committed Nov 27, 2019
1 parent d082195 commit ae33d629786717178492867cc7a22b66039d3491
@@ -63,3 +63,6 @@ __pycache__/
.tox/
.cache/
.pytest_cache/
/.settings/
/.cproject
/.project
@@ -151,8 +151,7 @@ operator >> (std::istream &in, TextEncoder::Encoding &encoding);

// This function is declared inline to minimize the risk of link conflicts
// should another third-party module also define the same output operator.
INLINE EXPCL_DTOOL_DTOOLUTIL std::ostream &
operator << (std::ostream &out, const std::wstring &str);
INLINE std::ostream & operator << (std::ostream &out, const std::wstring &str);

#include "textEncoder.I"

@@ -74,7 +74,7 @@ class EXPCL_PANDABULLET BulletDebugNode : public PandaNode {
UnalignedLVecBase4 _color;
};

class DebugDraw : public btIDebugDraw {
class EXPCL_PANDABULLET DebugDraw : public btIDebugDraw {

public:
DebugDraw() {};
@@ -65,7 +65,7 @@ class EXPCL_PANDA_EXPRESS VirtualFileMountRamdisk : public VirtualFileMount {
class File;
class Directory;

class FileBase : public TypedReferenceCount {
class EXPCL_PANDA_EXPRESS FileBase : public TypedReferenceCount {
public:
INLINE FileBase(const std::string &basename);
virtual ~FileBase();
@@ -94,7 +94,7 @@ class EXPCL_PANDA_EXPRESS VirtualFileMountRamdisk : public VirtualFileMount {
static TypeHandle _type_handle;
};

class File : public FileBase {
class EXPCL_PANDA_EXPRESS File : public FileBase {
public:
INLINE File(const std::string &basename);

@@ -121,7 +121,7 @@ class EXPCL_PANDA_EXPRESS VirtualFileMountRamdisk : public VirtualFileMount {

typedef pset<PT(FileBase), indirect_less<FileBase *> > Files;

class Directory : public FileBase {
class EXPCL_PANDA_EXPRESS Directory : public FileBase {
public:
INLINE Directory(const std::string &basename);

@@ -295,7 +295,7 @@ class EXPCL_PANDA_GOBJ Geom : public CopyOnWriteObject, public GeomEnums {
}

private:
static TypeHandle _type_handle;
static EXPCL_PANDA_GOBJ TypeHandle _type_handle;
};
typedef pmap<const CacheKey *, PT(CacheEntry), IndirectLess<CacheKey> > Cache;

@@ -399,7 +399,7 @@ class EXPCL_PANDA_GOBJ Lens : public TypedWritableReferenceCount {
static TypeHandle _type_handle;
};

EXPCL_PANDA_GOBJ INLINE std::ostream &operator << (std::ostream &out, const Lens &lens);
INLINE std::ostream &operator << (std::ostream &out, const Lens &lens);

#include "lens.I"

@@ -313,7 +313,7 @@ read_data(unsigned char *data, size_t size, VertexDataSaveBlock *block) {
}
success = GetOverlappedResult(_handle, &overlapped, &bytes_read, false);
}
nassertr(bytes_read == size, nullptr);
nassertr(bytes_read == size, false);
double finish_time = ClockObject::get_global_clock()->get_real_time();
if (gobj_cat.is_debug()) {
gobj_cat.debug()
@@ -27,29 +27,25 @@ extern EXPCL_PANDA_PNMIMAGE const float to_linear_float_table[256];

BEGIN_PUBLISH

EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(float val);
INLINE float decode_sRGB_float(unsigned char val);
INLINE float decode_sRGB_float(float val);
INLINE unsigned char decode_sRGB_uchar(unsigned char val);
INLINE unsigned char decode_sRGB_uchar(float val);

EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(float val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(float val);
INLINE float encode_sRGB_float(unsigned char val);
INLINE float encode_sRGB_float(float val);
INLINE unsigned char encode_sRGB_uchar(unsigned char val);
INLINE unsigned char encode_sRGB_uchar(float val);

END_PUBLISH

// These functions convert more than one component in one go, which can be
// faster due to vectorization.
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColorf &from,
xel &into);
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColorf &from,
xel &into, xelval &into_alpha);
INLINE void encode_sRGB_uchar(const LColorf &from, xel &into);
INLINE void encode_sRGB_uchar(const LColorf &from, xel &into, xelval &into_alpha);

EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColord &from,
xel &into);
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColord &from,
xel &into, xelval &into_alpha);
INLINE void encode_sRGB_uchar(const LColord &from, xel &into);
INLINE void encode_sRGB_uchar(const LColord &from, xel &into, xelval &into_alpha);

// Use these functions if you know that SSE2 support is available. Otherwise,
// they will crash!

0 comments on commit ae33d62

Please sign in to comment.
You can’t perform that action at this time.