- Timestamp:
- Feb 28, 2009, 7:46:37 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore deleted
- Property svn:mergeinfo changed
-
code/trunk/src/network/synchronisable/SynchronisableVariable.cc
r2662 r2710 362 362 { 363 363 double temp; 364 *(uint64_t*)(&temp) = *(uint64_t*)(mem);364 memcpy(&temp, mem, sizeof(uint64_t)); 365 365 *(long double*)(&this->variable_) = static_cast<const long double>(temp); 366 366 mem += SynchronisableVariable<const long double>::returnSize(); … … 370 370 { 371 371 double temp = static_cast<double>(this->variable_); 372 *(uint64_t*)(mem) = *(uint64_t*)(&temp);372 memcpy(mem, &temp, sizeof(uint64_t)); 373 373 mem += SynchronisableVariable<const long double>::returnSize(); 374 374 } … … 377 377 { 378 378 double temp = static_cast<double>(this->variable_); 379 return *(uint64_t*)(mem) == *(uint64_t*)(&temp);379 return memcmp(&temp, mem, sizeof(uint64_t))==0; 380 380 } 381 381
Note: See TracChangeset
for help on using the changeset viewer.