diff options
author | Yi Kong <yikong@google.com> | 2017-05-03 13:26:48 -0700 |
---|---|---|
committer | Yi Kong <yikong@google.com> | 2017-05-03 21:57:35 +0000 |
commit | 4af98c3b231f9a68149c73698c5f58d064c6893a (patch) | |
tree | 6bcfddcd6a65b4a958bf195e2b1a797bec544027 | |
parent | 1a1d34791e11ca76568c3d97c9d383b115bcdbc2 (diff) | |
download | native-4af98c3b231f9a68149c73698c5f58d064c6893a.tar.gz |
Add const specifier to SortLayersByZ comparator
No functionality change.
Test: build
Bug: 37752547
Change-Id: I33ffccbd7bc67031680e3fe7e9263de5402a9cde
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp | 5 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp index 617ea9fa2e..7f482892ff 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp +++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp @@ -1993,9 +1993,8 @@ HWC2On1Adapter::Layer::Layer(Display& display) mHasUnsupportedDataspace(false), mHasUnsupportedPlaneAlpha(false) {} -bool HWC2On1Adapter::SortLayersByZ::operator()( - const std::shared_ptr<Layer>& lhs, const std::shared_ptr<Layer>& rhs) -{ +bool HWC2On1Adapter::SortLayersByZ::operator()(const std::shared_ptr<Layer>& lhs, + const std::shared_ptr<Layer>& rhs) const { return lhs->getZ() < rhs->getZ(); } diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h index 962361ec6e..45922af736 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h +++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h @@ -123,7 +123,7 @@ private: class SortLayersByZ { public: bool operator()(const std::shared_ptr<Layer>& lhs, - const std::shared_ptr<Layer>& rhs); + const std::shared_ptr<Layer>& rhs) const; }; class DisplayContentsDeleter { |