Explorar el Código

build: a few gcc/makefile compilation fixes.

undefined
Sam Hocevar hace 10 años
padre
commit
79b3493a0c
Se han modificado 2 ficheros con 30 adiciones y 7 borrados
  1. +1
    -0
      src/Makefile.am
  2. +29
    -7
      src/lol/sys/thread.h

+ 1
- 0
src/Makefile.am Ver fichero

@@ -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 Ver fichero

@@ -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


Cargando…
Cancelar
Guardar