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

Unified Diff: ui/ozone/platform/drm/gpu/drm_device.cc

Issue 2126433002: Use container::back() and container::pop_back() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pre-increment Created 4 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 | « ui/message_center/views/notification_view.cc ('k') | ui/views/controls/textfield/textfield_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_device.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc
index c017f207cc8f8fbe565830411d1dceb503e5134f..462ec641a43a63eb596a8a0c1d0689b216eec02c 100644
--- a/ui/ozone/platform/drm/gpu/drm_device.cc
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -278,7 +278,7 @@ std::vector<GammaRampRGBEntry> ResampleLut(
(lut_in[base_index + 1].b - lut_in[base_index].b) *
remaining / desired_size;
} else {
- result[i] = lut_in[lut_in.size() - 1];
+ result[i] = lut_in.back();
}
}
@@ -304,8 +304,7 @@ class DrmDevice::PageFlipManager {
}
DrmDevice::PageFlipCallback callback = it->callback;
- it->pending_calls -= 1;
-
+ it->pending_calls--;
if (it->pending_calls)
return;
@@ -329,11 +328,11 @@ class DrmDevice::PageFlipManager {
};
struct FindCallback {
- FindCallback(uint64_t id) : id(id) {}
+ explicit FindCallback(uint64_t id) : id(id) {}
bool operator()(const PageFlip& flip) const { return flip.id == id; }
- uint64_t id;
+ const uint64_t id;
};
uint64_t next_id_;
« no previous file with comments | « ui/message_center/views/notification_view.cc ('k') | ui/views/controls/textfield/textfield_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698