Add overrides and switch to nullptr keyword for all files
Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.
Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
diff --git a/libs/hwui/PixelBuffer.cpp b/libs/hwui/PixelBuffer.cpp
index 6c448f0..efa271e 100644
--- a/libs/hwui/PixelBuffer.cpp
+++ b/libs/hwui/PixelBuffer.cpp
@@ -35,12 +35,12 @@
public:
CpuPixelBuffer(GLenum format, uint32_t width, uint32_t height);
- uint8_t* map(AccessMode mode = kAccessMode_ReadWrite);
- void unmap();
+ uint8_t* map(AccessMode mode = kAccessMode_ReadWrite) override;
+ void unmap() override;
- uint8_t* getMappedPointer() const;
+ uint8_t* getMappedPointer() const override;
- void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset);
+ void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset) override;
private:
std::unique_ptr<uint8_t[]> mBuffer;
@@ -80,12 +80,12 @@
GpuPixelBuffer(GLenum format, uint32_t width, uint32_t height);
~GpuPixelBuffer();
- uint8_t* map(AccessMode mode = kAccessMode_ReadWrite);
- void unmap();
+ uint8_t* map(AccessMode mode = kAccessMode_ReadWrite) override;
+ void unmap() override;
- uint8_t* getMappedPointer() const;
+ uint8_t* getMappedPointer() const override;
- void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset);
+ void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset) override;
private:
GLuint mBuffer;
@@ -93,11 +93,13 @@
Caches& mCaches;
};
-GpuPixelBuffer::GpuPixelBuffer(GLenum format, uint32_t width, uint32_t height):
- PixelBuffer(format, width, height), mMappedPointer(0), mCaches(Caches::getInstance()) {
+GpuPixelBuffer::GpuPixelBuffer(GLenum format, uint32_t width, uint32_t height)
+ : PixelBuffer(format, width, height)
+ , mMappedPointer(nullptr)
+ , mCaches(Caches::getInstance()) {
glGenBuffers(1, &mBuffer);
mCaches.bindPixelBuffer(mBuffer);
- glBufferData(GL_PIXEL_UNPACK_BUFFER, getSize(), NULL, GL_DYNAMIC_DRAW);
+ glBufferData(GL_PIXEL_UNPACK_BUFFER, getSize(), nullptr, GL_DYNAMIC_DRAW);
mCaches.unbindPixelBuffer();
}
@@ -133,7 +135,7 @@
}
}
mAccessMode = kAccessMode_None;
- mMappedPointer = NULL;
+ mMappedPointer = nullptr;
}
}