With ptrhead, Thread::currentTid() returns a pointer to a struct which

leads to a compile error when assigning it to an long. Thus _ostid type
should be changed to IntPtr and the assignment should use a
reinterpret_cast.

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE
2015-08-17 07:36:57 +02:00
parent 7470e4fc12
commit 2f40cd5b59
2 changed files with 3 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ private:
Priority _prio; Priority _prio;
Timestamp _time; Timestamp _time;
int _tid; int _tid;
int _ostid; IntPtr _ostid;
std::string _thread; std::string _thread;
long _pid; long _pid;
const char* _file; const char* _file;
@@ -247,7 +247,7 @@ inline long Message::getTid() const
} }
inline long Message::getOsTid() const inline IntPtr Message::getOsTid() const
{ {
return _ostid; return _ostid;
} }

View File

@@ -118,7 +118,7 @@ void Message::init()
#if !defined(POCO_VXWORKS) #if !defined(POCO_VXWORKS)
_pid = Process::id(); _pid = Process::id();
#endif #endif
_ostid = Thread::currentTid(); _ostid = reinterpret_cast<IntPtr>(Thread::currentTid());
Thread* pThread = Thread::current(); Thread* pThread = Thread::current();
if (pThread) if (pThread)
{ {