diff options
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r-- | src/mbgl/gl/context.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/gl/uniform.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/gl/upload_pass.cpp | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index 4d9c2055de..18b376e3dc 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -210,7 +210,8 @@ UniqueTexture Context::createUniqueTexture() { TextureID id = pooledTextures.back(); pooledTextures.pop_back(); - return UniqueTexture{ std::move(id), { this } }; + // NOLINTNEXTLINE(performance-move-const-arg) + return UniqueTexture{std::move(id), {this}}; } bool Context::supportsVertexArrays() const { @@ -224,6 +225,7 @@ VertexArray Context::createVertexArray() { if (supportsVertexArrays()) { VertexArrayID id = 0; MBGL_CHECK_ERROR(vertexArray->genVertexArrays(1, &id)); + // NOLINTNEXTLINE(performance-move-const-arg) UniqueVertexArray vao(std::move(id), { this }); return { UniqueVertexArrayState(new VertexArrayState(std::move(vao)), VertexArrayStateDeleter { true })}; } else { @@ -236,6 +238,7 @@ VertexArray Context::createVertexArray() { UniqueFramebuffer Context::createFramebuffer() { FramebufferID id = 0; MBGL_CHECK_ERROR(glGenFramebuffers(1, &id)); + // NOLINTNEXTLINE(performance-move-const-arg) return UniqueFramebuffer{ std::move(id), { this } }; } @@ -269,6 +272,7 @@ std::unique_ptr<gfx::RenderbufferResource> Context::createRenderbufferResource(const gfx::RenderbufferPixelType type, const Size size) { RenderbufferID id = 0; MBGL_CHECK_ERROR(glGenRenderbuffers(1, &id)); + // NOLINTNEXTLINE(performance-move-const-arg) UniqueRenderbuffer renderbuffer{ std::move(id), { this } }; bindRenderbuffer = renderbuffer; diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp index 10501036cb..9f752de8af 100644 --- a/src/mbgl/gl/uniform.hpp +++ b/src/mbgl/gl/uniform.hpp @@ -37,8 +37,7 @@ ActiveUniforms activeUniforms(ProgramID); template <class Value> class UniformState { public: - UniformState(UniformLocation location_ = -1) : location(std::move(location_)) { - } + UniformState(UniformLocation location_ = -1) : location(location_) {} void operator=(const Value& value) { if (location >= 0 && (!current || *current != value)) { diff --git a/src/mbgl/gl/upload_pass.cpp b/src/mbgl/gl/upload_pass.cpp index 358f1a7203..4312488fb4 100644 --- a/src/mbgl/gl/upload_pass.cpp +++ b/src/mbgl/gl/upload_pass.cpp @@ -20,6 +20,7 @@ std::unique_ptr<gfx::VertexBufferResource> UploadPass::createVertexBufferResourc const void* data, std::size_t size, const gfx::BufferUsageType usage) { BufferID id = 0; MBGL_CHECK_ERROR(glGenBuffers(1, &id)); + // NOLINTNEXTLINE(performance-move-const-arg) UniqueBuffer result{ std::move(id), { commandEncoder.context } }; commandEncoder.context.vertexBuffer = result; MBGL_CHECK_ERROR( @@ -38,6 +39,7 @@ std::unique_ptr<gfx::IndexBufferResource> UploadPass::createIndexBufferResource( const void* data, std::size_t size, const gfx::BufferUsageType usage) { BufferID id = 0; MBGL_CHECK_ERROR(glGenBuffers(1, &id)); + // NOLINTNEXTLINE(performance-move-const-arg) UniqueBuffer result{ std::move(id), { commandEncoder.context } }; commandEncoder.context.bindVertexArray = 0; commandEncoder.context.globalVertexArrayState.indexBuffer = result; |