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

Unified Diff: webrtc/video/replay.cc

Issue 1228913003: Remove empty-string comparisons. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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 | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/replay.cc
diff --git a/webrtc/video/replay.cc b/webrtc/video/replay.cc
index 4b5aa0fb5f5b70dd67f7cef24e8779551954a5be..fa61257bbfefc16b5b31fd444ddcdf2e2f245b7c 100644
--- a/webrtc/video/replay.cc
+++ b/webrtc/video/replay.cc
@@ -106,7 +106,7 @@ static const bool timestamp_offset_dummy =
// Flag for rtpdump input file.
bool ValidateInputFilenameNotEmpty(const char* flagname,
const std::string& string) {
- return string != "";
+ return !string.empty();
}
DEFINE_string(input_file, "", "input file");
@@ -156,7 +156,7 @@ class FileRenderPassthrough : public VideoRenderer {
int time_to_render_ms) override {
if (renderer_ != nullptr)
renderer_->RenderFrame(video_frame, time_to_render_ms);
- if (basename_ == "")
+ if (basename_.empty())
return;
if (last_width_ != video_frame.width() ||
last_height_ != video_frame.height()) {
@@ -241,13 +241,13 @@ void RtpReplay() {
encoder_settings.payload_type = flags::PayloadType();
VideoReceiveStream::Decoder decoder;
rtc::scoped_ptr<DecoderBitstreamFileWriter> bitstream_writer;
- if (flags::DecoderBitstreamFilename() != "") {
+ if (!flags::DecoderBitstreamFilename().empty()) {
bitstream_writer.reset(new DecoderBitstreamFileWriter(
flags::DecoderBitstreamFilename().c_str()));
receive_config.pre_decode_callback = bitstream_writer.get();
}
decoder = test::CreateMatchingDecoder(encoder_settings);
- if (flags::DecoderBitstreamFilename() != "") {
+ if (!flags::DecoderBitstreamFilename().empty()) {
// Replace with a null decoder if we're writing the bitstream to a file
// instead.
delete decoder.decoder;
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698