Skip to content

Commit

Permalink
コンパイルエラーの修正
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Feb 17, 2024
1 parent 578ec1f commit 27e8e8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/fake_network_call_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ FakeNetworkCallFactory::FakeNetworkCallFactory(
const webrtc::DegradedCall::TimeScopedNetworkConfig& receive_config)
: send_config_(send_config), receive_config_(receive_config) {}

webrtc::Call* FakeNetworkCallFactory::CreateCall(
const webrtc::Call::Config& config) {
std::unique_ptr<webrtc::Call> FakeNetworkCallFactory::CreateCall(
const webrtc::CallConfig& config) {
webrtc::DegradedCall::TimeScopedNetworkConfig default_config;

webrtc::RtpTransportConfig transport_config = config.ExtractTransportConfig();
Expand All @@ -27,7 +27,7 @@ webrtc::Call* FakeNetworkCallFactory::CreateCall(
bool receive_config_changed =
memcmp(&receive_config_, &default_config, sizeof(default_config)) != 0;

webrtc::Call* call = webrtc::Call::Create(
auto call = webrtc::Call::Create(
config, webrtc::Clock::GetRealTimeClock(),
config.rtp_transport_controller_send_factory->Create(
transport_config, webrtc::Clock::GetRealTimeClock()));
Expand All @@ -37,8 +37,8 @@ webrtc::Call* FakeNetworkCallFactory::CreateCall(
send_config_};
std::vector<webrtc::DegradedCall::TimeScopedNetworkConfig> receive_config =
{receive_config_};
return new webrtc::DegradedCall(std::unique_ptr<webrtc::Call>(call),
send_config, receive_config);
return std::make_unique<webrtc::DegradedCall>(std::move(call), send_config,
receive_config);
}

return call;
Expand Down
3 changes: 2 additions & 1 deletion src/fake_network_call_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class FakeNetworkCallFactory : public webrtc::CallFactoryInterface {

private:
~FakeNetworkCallFactory() override {}
webrtc::Call* CreateCall(const webrtc::CallConfig& config) override;
std::unique_ptr<webrtc::Call> CreateCall(
const webrtc::CallConfig& config) override;

webrtc::DegradedCall::TimeScopedNetworkConfig send_config_;
webrtc::DegradedCall::TimeScopedNetworkConfig receive_config_;
Expand Down

0 comments on commit 27e8e8f

Please sign in to comment.