Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: webrtc/call.h

Issue 1166263004: C++11 in-class member initialization in Call configs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: merge master Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/video_receive_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call.h
diff --git a/webrtc/call.h b/webrtc/call.h
index ac11794ca251904f4e184e28add1d731efd139ad..d1a45c8bab147612991d9daccc13ef5bf5222368 100644
--- a/webrtc/call.h
+++ b/webrtc/call.h
@@ -73,54 +73,43 @@ class Call {
kNetworkDown,
};
struct Config {
+ Config() = delete;
explicit Config(newapi::Transport* send_transport)
- : send_transport(send_transport),
- voice_engine(NULL),
- overuse_callback(NULL) {}
+ : send_transport(send_transport) {}
static const int kDefaultStartBitrateBps;
// TODO(solenberg): Need to add media type to the interface for outgoing
// packets too.
- newapi::Transport* send_transport;
+ newapi::Transport* send_transport = nullptr;
// VoiceEngine used for audio/video synchronization for this Call.
- VoiceEngine* voice_engine;
+ VoiceEngine* voice_engine = nullptr;
// Callback for overuse and normal usage based on the jitter of incoming
- // captured frames. 'NULL' disables the callback.
- LoadObserver* overuse_callback;
+ // captured frames. 'nullptr' disables the callback.
+ LoadObserver* overuse_callback = nullptr;
// Bitrate config used until valid bitrate estimates are calculated. Also
// used to cap total bitrate used.
struct BitrateConfig {
- BitrateConfig()
- : min_bitrate_bps(0),
- start_bitrate_bps(kDefaultStartBitrateBps),
- max_bitrate_bps(-1) {}
- int min_bitrate_bps;
- int start_bitrate_bps;
- int max_bitrate_bps;
+ int min_bitrate_bps = 0;
+ int start_bitrate_bps = kDefaultStartBitrateBps;
+ int max_bitrate_bps = -1;
} bitrate_config;
struct AudioConfig {
- AudioDeviceModule* audio_device_manager;
- AudioProcessing* audio_processing;
- VoiceEngineObserver* voice_engine_observer;
+ AudioDeviceModule* audio_device_manager = nullptr;
+ AudioProcessing* audio_processing = nullptr;
+ VoiceEngineObserver* voice_engine_observer = nullptr;
} audio_config;
};
struct Stats {
- Stats()
- : send_bandwidth_bps(0),
- recv_bandwidth_bps(0),
- pacer_delay_ms(0),
- rtt_ms(-1) {}
-
- int send_bandwidth_bps;
- int recv_bandwidth_bps;
- int64_t pacer_delay_ms;
- int64_t rtt_ms;
+ int send_bandwidth_bps = 0;
+ int recv_bandwidth_bps = 0;
+ int64_t pacer_delay_ms = 0;
+ int64_t rtt_ms = -1;
};
static Call* Create(const Call::Config& config);
« no previous file with comments | « no previous file | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698