예제 #1
0
파일: variant.hpp 프로젝트: FollowMyVote/fc
 static inline void from_variant( const fc::variant& v, T& o, uint32_t max_depth = 1 )
 { 
     if( v.is_string() )
        o = fc::reflector<T>::from_string( v.get_string().c_str() );
     else
        o = fc::reflector<T>::from_int( v.as_int64() );
 }
예제 #2
0
파일: variant.hpp 프로젝트: BitMoneta/fc
 static inline void from_variant( const fc::variant& v, T& o ) 
 { 
     if( v.is_string() )
        o = fc::reflector<T>::from_string( v.get_string().c_str() );
     else 
        o = static_cast<T>(v.as_int64());
 }