Bläddra i källkod

build: a few gcc/makefile compilation fixes.

undefined
Sam Hocevar 10 år sedan
förälder
incheckning
79b3493a0c
2 ändrade filer med 30 tillägg och 7 borttagningar
  1. +1
    -0
      src/Makefile.am
  2. +29
    -7
      src/lol/sys/thread.h

+ 1
- 0
src/Makefile.am Visa fil

@@ -111,6 +111,7 @@ liblolcore_sources = \
image/image.cpp image/image-private.h \
image/codec/gdiplus-image.cpp \
image/codec/ios-image.cpp \
image/codec/zed-image.cpp image/codec/zed-palette-image.cpp \
image/codec/dummy-image.cpp \
image/color/cie1931.cpp \
image/color/color.cpp \


+ 29
- 7
src/lol/sys/thread.h Visa fil

@@ -67,14 +67,36 @@ struct ThreadCommand
template<typename T1>
struct JobCommand : public ThreadCommand
{
T1 m_data;
inline JobCommand()
: ThreadCommand(ThreadCommand::WORK_TODO)
{}

inline JobCommand(Value v)
: ThreadCommand(v)
{}

inline JobCommand(T1 const &data)
: ThreadCommand(ThreadCommand::WORK_TODO),
m_data(data)
{}

inline JobCommand() : ThreadCommand(ThreadCommand::WORK_TODO) {}
inline JobCommand(Value v) : ThreadCommand(v) {}
inline JobCommand(T1 data) : ThreadCommand(ThreadCommand::WORK_TODO) { m_data = data; }
inline JobCommand(Value v, T1 data) : m_value(v) { m_data = data; }
inline void SetData(T1 data) { m_data = data; }
inline T1 GetData() { return m_data; }
inline JobCommand(Value v, T1 const &data)
: ThreadCommand(v),
m_data(data)
{}

inline void SetData(T1 const &data)
{
m_data = data;
}

inline T1 GetData()
{
return m_data;
}

private:
T1 m_data;
};

template<typename T1, typename T2> class ThreadManager


Laddar…
Avbryt
Spara