Use static_cast to get webrtc::Peerconnection in common workaround.
Bug: None Change-Id: I523a22cfe69757e38922634d6054dca2d3bedb1a No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/32640 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21239}
This commit is contained in:

committed by
Commit Bot

parent
1aa285974b
commit
e97de91d39
@ -92,9 +92,10 @@ class PeerConnectionWrapperForBundleTest : public PeerConnectionWrapper {
|
||||
}
|
||||
|
||||
PeerConnection* GetInternalPeerConnection() {
|
||||
auto* pci = reinterpret_cast<
|
||||
PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(pc());
|
||||
return reinterpret_cast<PeerConnection*>(pci->internal());
|
||||
auto* pci =
|
||||
static_cast<PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(
|
||||
pc());
|
||||
return static_cast<PeerConnection*>(pci->internal());
|
||||
}
|
||||
|
||||
// Returns true if the stats indicate that an ICE connection is either in
|
||||
|
@ -74,9 +74,10 @@ class PeerConnectionWrapperForDataChannelTest : public PeerConnectionWrapper {
|
||||
}
|
||||
|
||||
PeerConnection* GetInternalPeerConnection() {
|
||||
auto* pci = reinterpret_cast<
|
||||
PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(pc());
|
||||
return reinterpret_cast<PeerConnection*>(pci->internal());
|
||||
auto* pci =
|
||||
static_cast<PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(
|
||||
pc());
|
||||
return static_cast<PeerConnection*>(pci->internal());
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -187,11 +187,10 @@ class PeerConnectionIceUnitTest : public ::testing::Test {
|
||||
// TODO(qingsi): Rewrite this method in terms of the standard IceTransport
|
||||
// after it is implemented.
|
||||
cricket::IceRole GetIceRole(const WrapperPtr& pc_wrapper_ptr) {
|
||||
auto* pc_proxy = reinterpret_cast<
|
||||
PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(
|
||||
pc_wrapper_ptr->pc());
|
||||
PeerConnection* pc =
|
||||
reinterpret_cast<PeerConnection*>(pc_proxy->internal());
|
||||
auto* pc_proxy =
|
||||
static_cast<PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(
|
||||
pc_wrapper_ptr->pc());
|
||||
PeerConnection* pc = static_cast<PeerConnection*>(pc_proxy->internal());
|
||||
return pc->voice_channel()
|
||||
->rtp_dtls_transport()
|
||||
->ice_transport()
|
||||
|
@ -48,9 +48,10 @@ class PeerConnectionWrapperForSignalingTest : public PeerConnectionWrapper {
|
||||
}
|
||||
|
||||
PeerConnection* GetInternalPeerConnection() {
|
||||
auto* pci = reinterpret_cast<
|
||||
PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(pc());
|
||||
return reinterpret_cast<PeerConnection*>(pci->internal());
|
||||
auto* pci =
|
||||
static_cast<PeerConnectionProxyWithInternal<PeerConnectionInterface>*>(
|
||||
pc());
|
||||
return static_cast<PeerConnection*>(pci->internal());
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user