[core] clang-tidy fixes

This commit is contained in:
Konstantin Käfer
2019-04-03 12:27:14 +02:00
parent d7aaf83421
commit 3ceabcd3ec
87 changed files with 856 additions and 684 deletions

View File

@@ -39,7 +39,7 @@ void main() {
class TestLayer : public mbgl::style::CustomLayerHost {
public:
void initialize() {
void initialize() override {
program = MBGL_CHECK_ERROR(glCreateProgram());
vertexShader = MBGL_CHECK_ERROR(glCreateShader(GL_VERTEX_SHADER));
fragmentShader = MBGL_CHECK_ERROR(glCreateShader(GL_FRAGMENT_SHADER));
@@ -59,7 +59,7 @@ public:
MBGL_CHECK_ERROR(glBufferData(GL_ARRAY_BUFFER, 6 * sizeof(GLfloat), triangle, GL_STATIC_DRAW));
}
void render(const mbgl::style::CustomLayerRenderParameters&) {
void render(const mbgl::style::CustomLayerRenderParameters&) override {
MBGL_CHECK_ERROR(glUseProgram(program));
MBGL_CHECK_ERROR(glBindBuffer(GL_ARRAY_BUFFER, buffer));
MBGL_CHECK_ERROR(glEnableVertexAttribArray(a_pos));
@@ -67,9 +67,9 @@ public:
MBGL_CHECK_ERROR(glDrawArrays(GL_TRIANGLE_STRIP, 0, 3));
}
void contextLost() {}
void contextLost() override {}
void deinitialize() {
void deinitialize() override {
if (program) {
MBGL_CHECK_ERROR(glDeleteBuffers(1, &buffer));
MBGL_CHECK_ERROR(glDetachShader(program, vertexShader));