added bool->str to serial_bridge_utils - this can probably be improved with a fn using a generic type

pull/23/head
Paul Shapiro 5 years ago
parent df52b0d6b8
commit ca15366936

@ -53,7 +53,7 @@ namespace serial_bridge_utils
string string_from_nettype(network_type nettype);
//
struct RetVals_Transforms
{
{ // TODO: can these be generalized with generics?
static string str_from(uint64_t v)
{
std::ostringstream o;
@ -66,6 +66,12 @@ namespace serial_bridge_utils
o << v;
return o.str();
}
static string str_from(bool v)
{
std::ostringstream o;
o << v;
return o.str();
}
};
string ret_json_from_root(const boost::property_tree::ptree &root);
string error_ret_json_from_message(const string &err_msg);

Loading…
Cancel
Save