diff --git a/include/fc/raw.hpp b/include/fc/raw.hpp index f363f3e..540e191 100644 --- a/include/fc/raw.hpp +++ b/include/fc/raw.hpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include //#include namespace fc { @@ -38,6 +40,15 @@ namespace fc { template inline void unpack( Stream& s, fc::vector& v ); + + template + inline void pack( Stream& s, const fc::array& v) { + s.write((const char*)&v.data[0],N*sizeof(T)); + } + template + inline void unpack( Stream& s, fc::array& v) { + s.read((char*)&v.data[0],N*sizeof(T)); + } template inline void pack( Stream& s, const signed_int& v ) { uint32_t val = (v.value<<1) ^ (v.value>>31); do { @@ -131,7 +142,6 @@ namespace fc { template void operator()( const char* name )const { - //slog( "packing %s", name ); raw::pack( s, c.*p ); } private: