[readability-container-size-empty] Use empty() to check for emptiness.
Bug: None Change-Id: If3cefd0f50521357a7fadef661954d2845246db6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146718 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28683}
This commit is contained in:
committed by
Commit Bot
parent
733a78157d
commit
1f1731509c
@ -39,7 +39,7 @@ void PythonPlot::Draw() {
|
||||
printf("\n# === Series: %s ===\n", series_list_[i].label.c_str());
|
||||
// List x coordinates
|
||||
printf("x%zu = [", i);
|
||||
if (series_list_[i].points.size() > 0)
|
||||
if (!series_list_[i].points.empty())
|
||||
printf("%.3f", series_list_[i].points[0].x);
|
||||
for (size_t j = 1; j < series_list_[i].points.size(); j++)
|
||||
printf(", %.3f", series_list_[i].points[j].x);
|
||||
@ -47,7 +47,7 @@ void PythonPlot::Draw() {
|
||||
|
||||
// List y coordinates
|
||||
printf("y%zu = [", i);
|
||||
if (series_list_[i].points.size() > 0)
|
||||
if (!series_list_[i].points.empty())
|
||||
printf("%G", series_list_[i].points[0].y);
|
||||
for (size_t j = 1; j < series_list_[i].points.size(); j++)
|
||||
printf(", %G", series_list_[i].points[j].y);
|
||||
@ -114,7 +114,7 @@ void PythonPlot::Draw() {
|
||||
printf("\n# === IntervalSeries: %s ===\n",
|
||||
interval_list_[i].label.c_str());
|
||||
printf("ival%zu = [", i);
|
||||
if (interval_list_[i].intervals.size() > 0) {
|
||||
if (!interval_list_[i].intervals.empty()) {
|
||||
printf("(%G, %G)", interval_list_[i].intervals[0].begin,
|
||||
interval_list_[i].intervals[0].end);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user