Exemple #1
0
 void List<T>::FastWriteTo( ByteBuffer& bb ) const
 {
     bb.FastVarWrite( (uint)size );
     if( !std::is_pointer<T>::value && std::is_pod<T>::value )
     {
         if( !size ) return;
         bb.FastWrite( (char*)buf, size * sizeof( T ) );
         return;
     }
     for( int i = 0; i < size; ++i )
     {
         bb.FastWrite( buf[ i ] );
     }
 }
Exemple #2
0
 void String::FastWriteTo( ByteBuffer& bb ) const
 {
     bb.FastVarWrite( (uint)dataLen );
     if( !dataLen ) return;
     bb.FastWrite( buf, dataLen );
 }