- Timestamp:
- Feb 28, 2009, 12:35:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem3/src/network/synchronisable/SynchronisableVariable.cc
r2662 r2706 362 362 { 363 363 double temp; 364 *(uint64_t*)(&temp) = *(uint64_t*)(mem); 364 memcpy(&temp, mem, sizeof(uint64_t)); 365 //*(uint64_t*)(&temp) = *(uint64_t*)(mem); 365 366 *(long double*)(&this->variable_) = static_cast<const long double>(temp); 366 367 mem += SynchronisableVariable<const long double>::returnSize(); … … 370 371 { 371 372 double temp = static_cast<double>(this->variable_); 372 *(uint64_t*)(mem) = *(uint64_t*)(&temp);373 memcpy(mem, &temp, sizeof(uint64_t)); 373 374 mem += SynchronisableVariable<const long double>::returnSize(); 374 375 } … … 377 378 { 378 379 double temp = static_cast<double>(this->variable_); 379 return *(uint64_t*)(mem) == *(uint64_t*)(&temp); 380 return memcmp(&temp, mem, sizeof(uint64_t))==0; 381 //return *(uint64_t*)(mem) == *(uint64_t*)(&temp); 380 382 } 381 383
Note: See TracChangeset
for help on using the changeset viewer.