Commit 5d33e4c9 by Johnny

refine: update static_cast in webrtc api

parent cb92cd0b
...@@ -1595,7 +1595,7 @@ void installWebApi() { ...@@ -1595,7 +1595,7 @@ void installWebApi() {
auto offer = allArgs.getArgs(); auto offer = allArgs.getArgs();
CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty"); CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty");
WebRtcPluginManager::Instance().getAnswerSdp(*(static_cast<Session *>(&sender)), type, WebRtcPluginManager::Instance().getAnswerSdp(static_cast<Session&>(sender), type,
WebRtcArgsImp(allArgs, sender.getIdentifier()), WebRtcArgsImp(allArgs, sender.getIdentifier()),
[invoker, val, offer, headerOut](const WebRtcInterface &exchanger) mutable { [invoker, val, offer, headerOut](const WebRtcInterface &exchanger) mutable {
//设置返回类型 //设置返回类型
...@@ -1620,7 +1620,7 @@ void installWebApi() { ...@@ -1620,7 +1620,7 @@ void installWebApi() {
auto offer = allArgs.getArgs(); auto offer = allArgs.getArgs();
CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty"); CHECK(!offer.empty(), "http body(webrtc offer sdp) is empty");
WebRtcPluginManager::Instance().getAnswerSdp(*(static_cast<Session *>(&sender)), type, WebRtcPluginManager::Instance().getAnswerSdp(static_cast<Session&>(sender), type,
WebRtcArgsImp(allArgs, sender.getIdentifier()), WebRtcArgsImp(allArgs, sender.getIdentifier()),
[invoker, offer, headerOut](const WebRtcInterface &exchanger) mutable { [invoker, offer, headerOut](const WebRtcInterface &exchanger) mutable {
// 设置跨域 // 设置跨域
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论