From: Christian P. <cp...@us...> - 2005-01-16 01:57:31
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16078/include/pclasses/System Modified Files: ThreadKey.h Log Message: Fixed const qualifier Index: ThreadKey.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/ThreadKey.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ThreadKey.h 16 Jan 2005 01:48:58 -0000 1.1 +++ ThreadKey.h 16 Jan 2005 01:57:16 -0000 1.2 @@ -36,10 +36,10 @@ class ThreadKeyImpl: public NonCopyable { public: ThreadKeyImpl() throw(SystemError); - ~ThreadKeyImpl(); + ~ThreadKeyImpl() throw(); void set(void* ptr) throw(); - void* get() throw(); + void* get() const throw(); private: unsigned long _handle; @@ -50,7 +50,8 @@ class ThreadKey: private ThreadKeyImpl { public: inline ThreadKey() throw(SystemError) - : ThreadKeyImpl() {} + : ThreadKeyImpl() + {} inline ThreadKey(const ThreadKey& k) throw(SystemError) : ThreadKeyImpl() @@ -65,13 +66,13 @@ return *this; } - inline ThreadKey& operator=(const Type* val) throw() + inline ThreadKey& operator=(Type* val) throw() { set(static_cast<void*>(val)); return *this; } - inline operator Type* () const throw() + inline operator Type* () throw() { return (Type*)get(); } }; |