Remove too strict const's from cbmanager
Bug: 144386336
Test: build
Change-Id: I0ef2dcf0e0735e19cda26820546e29a62c32d290
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/system/cbmanager/hidl.cpp b/system/cbmanager/hidl.cpp
index 764ae73..f506ef9 100644
--- a/system/cbmanager/hidl.cpp
+++ b/system/cbmanager/hidl.cpp
@@ -40,8 +40,8 @@
sp<IAllocator2ns::IAllocator> allocator)
: mMapper(mapper), mAllocator(allocator) {}
- const cb_handle_t* allocateBuffer(int width, int height,
- PixelFormat format, BufferUsageBits usage) {
+ cb_handle_t* allocateBuffer(int width, int height,
+ PixelFormat format, BufferUsageBits usage) {
using IMapper2ns::Error;
using IMapper2ns::BufferDescriptor;
@@ -77,7 +77,7 @@
RETURN_ERROR(nullptr);
}
- const cb_handle_t *buf = nullptr;
+ cb_handle_t *buf = nullptr;
mMapper->importBuffer(raw_handle, [&](const Error &_error,
void *_buf) {
hidl_err = _error;
diff --git a/system/include/cbmanager.h b/system/include/cbmanager.h
index 29eeab7..0ac9bdd 100644
--- a/system/include/cbmanager.h
+++ b/system/include/cbmanager.h
@@ -34,14 +34,14 @@
class CbManagerImpl {
public:
virtual ~CbManagerImpl() {}
- virtual const cb_handle_t* allocateBuffer(int width,
- int height,
- PixelFormat format,
- BufferUsageBits usage) = 0;
+ virtual cb_handle_t* allocateBuffer(int width,
+ int height,
+ PixelFormat format,
+ BufferUsageBits usage) = 0;
virtual void freeBuffer(const cb_handle_t* h) = 0;
};
- const cb_handle_t* allocateBuffer(int width, int height, PixelFormat format, BufferUsageBits usage) {
+ cb_handle_t* allocateBuffer(int width, int height, PixelFormat format, BufferUsageBits usage) {
return mImpl->allocateBuffer(width, height, format, usage);
}