-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
T buffer;
public:
- Remote() {}
- ~Remote() {}
- Remote(T& p) { std::memcpy(&buffer, &p, sizeof(buffer)); }
- Remote(Remote const& that) { std::memcpy(&buffer, &that.buffer, sizeof(buffer)); }
+ Remote() { /* Nothing to do */}
+ ~Remote() { /* Nothing to do */}
+ Remote(T const& p) { std::memcpy(static_cast<void*>(&buffer), static_cast<const void*>(&p), sizeof(buffer)); }
+ Remote(Remote const& that)
+ {
+ std::memcpy(static_cast<void*>(&buffer), static_cast<const void*>(&that.buffer), sizeof(buffer));
+ }
Remote& operator=(Remote const& that)
{
- std::memcpy(&buffer, &that.buffer, sizeof(buffer));
+ std::memcpy(static_cast<void*>(&buffer), static_cast<const void*>(&that.buffer), sizeof(buffer));
return *this;
}
T* getBuffer() { return &buffer; }