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:
@ -116,9 +116,9 @@ Logging::State::State(const std::string& tag, int64_t timestamp_ms,
|
||||
}
|
||||
|
||||
void Logging::State::MergePrevious(const State& previous) {
|
||||
if (tag == "") {
|
||||
if (tag.empty()) {
|
||||
tag = previous.tag;
|
||||
} else if (previous.tag != "") {
|
||||
} else if (!previous.tag.empty()) {
|
||||
tag = previous.tag + "_" + tag;
|
||||
}
|
||||
timestamp_ms = std::max(previous.timestamp_ms, timestamp_ms);
|
||||
|
||||
Reference in New Issue
Block a user