From b111a708da46e02a0ff89d1cd18c631060deea63 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 27 May 2017 06:27:36 +0200 Subject: [PATCH] - Fix compile error and some warnings --- src/gl/system/gl_swframebuffer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gl/system/gl_swframebuffer.cpp b/src/gl/system/gl_swframebuffer.cpp index 2f86bdc94..665b23d38 100644 --- a/src/gl/system/gl_swframebuffer.cpp +++ b/src/gl/system/gl_swframebuffer.cpp @@ -360,7 +360,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CreateF return nullptr; } - return std::move(fb); + return fb; } std::unique_ptr OpenGLSWFrameBuffer::CreatePixelShader(FString vertexsrc, FString fragmentsrc, const FString &defines) @@ -443,7 +443,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CreateP shader->NewScreenLocation = glGetUniformLocation(shader->Program, "NewScreen"); shader->BurnLocation = glGetUniformLocation(shader->Program, "Burn"); - return std::move(shader); + return shader; } std::unique_ptr OpenGLSWFrameBuffer::CreateVertexBuffer(int size) @@ -473,7 +473,7 @@ std::unique_ptr OpenGLSWFrameBuffer::Create glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(oldBinding); - return std::move(obj); + return obj; } std::unique_ptr OpenGLSWFrameBuffer::CreateIndexBuffer(int size) @@ -492,7 +492,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CreateI glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, oldBinding); - return std::move(obj); + return obj; } std::unique_ptr OpenGLSWFrameBuffer::CreateTexture(const FString &name, int width, int height, int levels, int format) @@ -519,7 +519,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CreateTextu case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: srcformat = GL_RGBA; break; default: I_FatalError("Unknown format passed to CreateTexture"); - return false; + return nullptr; } glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, srcformat, GL_UNSIGNED_BYTE, nullptr); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -529,7 +529,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CreateTextu glBindTexture(GL_TEXTURE_2D, oldBinding); - return std::move(obj); + return obj; } std::unique_ptr OpenGLSWFrameBuffer::CopyCurrentScreen() @@ -551,7 +551,7 @@ std::unique_ptr OpenGLSWFrameBuffer::CopyCurrent glBindTexture(GL_TEXTURE_2D, oldBinding); - return std::move(obj); + return obj; } void OpenGLSWFrameBuffer::SetGammaRamp(const GammaRamp *ramp)