Fix serialization of enums to use variable-length integerd
This commit is contained in:
parent
c23bbfb068
commit
9d408aa532
1 changed files with 3 additions and 3 deletions
|
|
@ -324,13 +324,13 @@ namespace fc {
|
||||||
struct if_enum<fc::true_type> {
|
struct if_enum<fc::true_type> {
|
||||||
template<typename Stream, typename T>
|
template<typename Stream, typename T>
|
||||||
static inline void pack( Stream& s, const T& v ) {
|
static inline void pack( Stream& s, const T& v ) {
|
||||||
fc::raw::pack(s, (int64_t)v);
|
fc::raw::pack(s, signed_int((int32_t)v));
|
||||||
}
|
}
|
||||||
template<typename Stream, typename T>
|
template<typename Stream, typename T>
|
||||||
static inline void unpack( Stream& s, T& v ) {
|
static inline void unpack( Stream& s, T& v ) {
|
||||||
int64_t temp;
|
signed_int temp;
|
||||||
fc::raw::unpack(s, temp);
|
fc::raw::unpack(s, temp);
|
||||||
v = (T)temp;
|
v = (T)temp.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue