Commit 17662fd3 authored by Pietro Incardona's avatar Pietro Incardona

Packer and unpacker changes

parent 6897f782
......@@ -170,7 +170,7 @@ public:
if (ext.ref() == 0)
std::cerr << "Error : " << __FILE__ << ":" << __LINE__ << " the reference counter of mem should never be zero when packing \n";
std::cerr << "Warning: " << __FILE__ << ":" << __LINE__ << " impossible to check the type " << demangle(typeid(T).name()) << " please consider to add a static method \"void noPointers()\" \n" ;
std::cerr << "Warning: " << __FILE__ << ":" << __LINE__ << " impossible to check the type " << demangle(typeid(T).name()) << " please consider to add a static method like \"static bool noPointers() {return true;}\" \n" ;
#endif
ext.allocate(sizeof(T));
memcpy((T *)ext.getPointer(),&obj,sizeof(T));
......
......@@ -114,7 +114,7 @@ public:
static void unpack(ExtPreAlloc<Mem> & ext, T & obj, Unpack_stat & ps)
{
#ifdef DEBUG
std::cerr << "Warning: " << __FILE__ << ":" << __LINE__ << " impossible to check the type " << demangle(typeid(T).name()) << " please consider to add a static method \"void noPointers()\" \n" ;
std::cerr << "Warning: " << __FILE__ << ":" << __LINE__ << " impossible to check the type " << demangle(typeid(T).name()) << " please consider to add a static method like \"static bool noPointers() {return true;}\" \n" ;
#endif
memcpy(&obj,(T *)ext.getPointerOffset(ps.getOffset()),sizeof(T));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment