kvp-value.cpp (gnucash-5.0.tar.bz2) | : | kvp-value.cpp (gnucash-5.1.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 102 | skipping to change at line 102 | |||
else if (datastore.type() == type_id<GList *>()) | else if (datastore.type() == type_id<GList *>()) | |||
return KvpValue::Type::GLIST; | return KvpValue::Type::GLIST; | |||
else if (datastore.type() == type_id<KvpFrameImpl *>()) | else if (datastore.type() == type_id<KvpFrameImpl *>()) | |||
return KvpValue::Type::FRAME; | return KvpValue::Type::FRAME; | |||
else if (datastore.type() == type_id<GDate>()) | else if (datastore.type() == type_id<GDate>()) | |||
return KvpValue::Type::GDATE; | return KvpValue::Type::GDATE; | |||
return KvpValue::Type::INVALID; | return KvpValue::Type::INVALID; | |||
} | } | |||
KvpFrame * | ||||
KvpValueImpl::replace_frame_nc (KvpFrame * new_value) noexcept | ||||
{ | ||||
if (datastore.type() != type_id<KvpFrame *>()) | ||||
return {}; | ||||
auto ret = boost::get<KvpFrame *>(datastore); | ||||
datastore = new_value; | ||||
return ret; | ||||
} | ||||
GList * | ||||
KvpValueImpl::replace_glist_nc (GList * new_value) noexcept | ||||
{ | ||||
if (datastore.type() != type_id<GList *>()) | ||||
return {}; | ||||
auto ret = boost::get<GList *>(datastore); | ||||
datastore = new_value; | ||||
return ret; | ||||
} | ||||
struct to_string_visitor : boost::static_visitor<void> | struct to_string_visitor : boost::static_visitor<void> | |||
{ | { | |||
std::ostringstream & output; | std::ostringstream & output; | |||
to_string_visitor(std::ostringstream & val) : output(val){} | to_string_visitor(std::ostringstream & val) : output(val){} | |||
void operator()(int64_t val) | void operator()(int64_t val) | |||
{ | { | |||
output << val << " (64-bit int)"; | output << val << " (64-bit int)"; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
20 lines changed or deleted | 0 lines changed or added |