Commit 38170c70 by custompal

修正gcc4.8编译错误

parent 640ed13d
...@@ -753,14 +753,14 @@ void installWebApi() { ...@@ -753,14 +753,14 @@ void installWebApi() {
val["code"] = API::Success; val["code"] = API::Success;
auto &data = val["data"]; auto &data = val["data"];
for (auto &info : info_list) { for (auto &info : info_list) {
auto obj = reinterpret_pointer_cast<Value>(info); auto obj = static_pointer_cast<Value>(info);
data.append(std::move(*obj)); data.append(std::move(*obj));
} }
invoker(200, headerOut, val.toStyledString()); invoker(200, headerOut, val.toStyledString());
}, },
[](std::shared_ptr<void> &&info) -> std::shared_ptr<void> { [](std::shared_ptr<void> &&info) -> std::shared_ptr<void> {
auto obj = std::make_shared<Value>(); auto obj = std::make_shared<Value>();
auto session = reinterpret_pointer_cast<Session>(info); auto session = static_pointer_cast<Session>(info);
(*obj)["peer_ip"] = session->get_peer_ip(); (*obj)["peer_ip"] = session->get_peer_ip();
(*obj)["peer_port"] = session->get_peer_port(); (*obj)["peer_port"] = session->get_peer_port();
return obj; return obj;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论