From 78b511c11e129fd9009a09ae7c448eed42ac4eef Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Tue, 20 Sep 2016 15:06:00 -0400 Subject: [PATCH] Fix warning in fixed_string.hpp --- include/fc/fixed_string.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/fc/fixed_string.hpp b/include/fc/fixed_string.hpp index b141165..4982838 100644 --- a/include/fc/fixed_string.hpp +++ b/include/fc/fixed_string.hpp @@ -7,7 +7,7 @@ namespace fc { /** * This class is designed to offer in-place memory allocation of a string up to Length equal to - * sizeof(Storage). + * sizeof(Storage). * * The string will serialize the same way as std::string for variant and raw formats * The string will sort according to the comparison operators defined for Storage, this enables effecient @@ -27,7 +27,7 @@ namespace fc { } } fixed_string( const char* str ) { - int l = strlen(str); + auto l = strlen(str); if( l <= sizeof(data) ) memcpy( (char*)&data, str, l ); else { @@ -35,7 +35,7 @@ namespace fc { } } - operator std::string()const { + operator std::string()const { const char* self = (const char*)&data; return std::string( self, self + size() ); } @@ -98,15 +98,15 @@ namespace fc { namespace raw { template - inline void pack( Stream& s, const fc::fixed_string& u ) { + inline void pack( Stream& s, const fc::fixed_string& u ) { unsigned_int size = u.size(); pack( s, size ); s.write( (const char*)&u.data, size ); } template - inline void unpack( Stream& s, fc::fixed_string& u ) { - unsigned_int size; + inline void unpack( Stream& s, fc::fixed_string& u ) { + unsigned_int size; fc::raw::unpack( s, size ); if( size.value > 0 ) { if( size.value > sizeof(Storage) ) { @@ -133,7 +133,7 @@ namespace fc { } template - inline void unpack( Stream& s, boost::multiprecision::number& u ) { + inline void unpack( Stream& s, boost::multiprecision::number& u ) { s.read( (const char*)&u, sizeof(u) ); } */