Changeset 2943
- Timestamp:
- Apr 30, 2009, 2:54:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp2/src/network/NetworkFunction.h
r2941 r2943 67 67 68 68 69 class NetworkFunctionBase: virtual public OrxonoxClass {69 class _NetworkExport NetworkFunctionBase: virtual public OrxonoxClass { 70 70 public: 71 71 NetworkFunctionBase(std::string name); … … 156 156 template<class T> inline void copyPtr( T ptr, NetworkFunctionPointer& destptr) 157 157 { 158 memset( &destptr, 0, sizeof(ptr));158 memset((uint8_t*)&destptr + sizeof(T), 0, sizeof(NetworkFunctionPointer)-sizeof(T)); 159 159 T p2 = ptr; 160 160 memcpy( &destptr, &p2, sizeof(T) ); … … 167 167 NetworkFunctionPointer destptr; 168 168 copyPtr( ptr, destptr ); 169 COUT(0) << "-==================== destptr: " << destptr.pointer[0] << ", " << destptr.pointer[1] << endl; 169 170 new NetworkFunctionStatic( createFunctor(ptr), name, destptr ); 170 171 return 0; … … 187 188 NetworkFunctionPointer p1; \ 188 189 copyPtr( functionPointer, p1 ); \ 189 FunctionCallManager::addCallStatic(Network MemberFunctionBase::getFunction(p1)->getNetworkID(), __VA_ARGS__); \190 FunctionCallManager::addCallStatic(NetworkFunctionStatic::getFunction(p1)->getNetworkID(), __VA_ARGS__); \ 190 191 } 191 192 #define callMemberNetworkFunction( functionPointer, objectID, ...) \
Note: See TracChangeset
for help on using the changeset viewer.