mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-17 03:03:24 +02:00
Fixed typo.
Removed function stype casts for strings.
This commit is contained in:
@@ -42,8 +42,8 @@ struct proc:boost::static_visitor<void> {
|
|||||||
// You can add values to msgpack::type::variant_ref.
|
// You can add values to msgpack::type::variant_ref.
|
||||||
v.insert(
|
v.insert(
|
||||||
std::multimap<msgpack::type::variant_ref, msgpack::type::variant_ref>::value_type(
|
std::multimap<msgpack::type::variant_ref, msgpack::type::variant_ref>::value_type(
|
||||||
std::string("role"),
|
"role",
|
||||||
std::string("msgpack-c committer")
|
"msgpack-c committer"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ struct proc:boost::static_visitor<void> {
|
|||||||
else if (key == "address") {
|
else if (key == "address") {
|
||||||
// When you want to append string
|
// When you want to append string
|
||||||
// "Tokyo" -> "Tokyo, JAPAN"
|
// "Tokyo" -> "Tokyo, JAPAN"
|
||||||
// Use msgpack::type::variant instead of msgpack::type::varinat_ref
|
// Use msgpack::type::variant instead of msgpack::type::variant_ref
|
||||||
// or do as follows:
|
// or do as follows:
|
||||||
boost::string_ref const& value = boost::get<boost::string_ref>(it->second);
|
boost::string_ref const& value = boost::get<boost::string_ref>(it->second);
|
||||||
it->second = std::string(&value.front(), value.size()) + ", JAPAN";
|
it->second = std::string(&value.front(), value.size()) + ", JAPAN";
|
||||||
|
Reference in New Issue
Block a user