Remove empty-string comparisons.

Use .empty() and !.empty() in favor of == "" or != "".

BUG=
R=tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1228913003

Cr-Commit-Position: refs/heads/master@{#9559}
This commit is contained in:
pbos
2015-07-09 07:48:14 -07:00
committed by Commit bot
parent 3b1e647b6a
commit bb36fdf95f
12 changed files with 20 additions and 21 deletions

View File

@ -111,7 +111,7 @@ int Log(const char *format, ...) {
// Returns 0 if everything is OK, otherwise an exit code.
int HandleCommandLineFlags(webrtc::test::TestConfig* config) {
// Validate the mandatory flags:
if (FLAGS_input_filename == "" || FLAGS_width == -1 || FLAGS_height == -1) {
if (FLAGS_input_filename.empty() || FLAGS_width == -1 || FLAGS_height == -1) {
printf("%s\n", google::ProgramUsage());
return 1;
}
@ -140,7 +140,7 @@ int HandleCommandLineFlags(webrtc::test::TestConfig* config) {
config->output_dir = FLAGS_output_dir;
// Manufacture an output filename if none was given.
if (FLAGS_output_filename == "") {
if (FLAGS_output_filename.empty()) {
// Cut out the filename without extension from the given input file
// (which may include a path)
int startIndex = FLAGS_input_filename.find_last_of("/") + 1;