Remove dead code detected by Coverity (#116)

fixes coverity reports CID 1518478, 1518465
This commit is contained in:
JosiahWI 2022-07-03 12:34:12 -05:00 committed by GitHub
parent 53e1b52ff4
commit 6064e12133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 18 deletions

@ -298,8 +298,6 @@ void CImage::copyToScalingBoxFilter(IImage* target, s32 bias, bool blend)
const f32 sourceXStep = (f32) Size.Width / (f32) destSize.Width; const f32 sourceXStep = (f32) Size.Width / (f32) destSize.Width;
const f32 sourceYStep = (f32) Size.Height / (f32) destSize.Height; const f32 sourceYStep = (f32) Size.Height / (f32) destSize.Height;
target->getData();
s32 fx = core::ceil32( sourceXStep ); s32 fx = core::ceil32( sourceXStep );
s32 fy = core::ceil32( sourceYStep ); s32 fy = core::ceil32( sourceYStep );
f32 sx; f32 sx;

@ -3794,22 +3794,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
pixels = static_cast<u8*>(newImage->getData()); pixels = static_cast<u8*>(newImage->getData());
if (pixels) if (pixels)
{ {
GLenum tgt=GL_FRONT; glReadBuffer(GL_FRONT);
switch (target)
{
case video::ERT_FRAME_BUFFER:
break;
case video::ERT_STEREO_LEFT_BUFFER:
tgt=GL_FRONT_LEFT;
break;
case video::ERT_STEREO_RIGHT_BUFFER:
tgt=GL_FRONT_RIGHT;
break;
default:
tgt=GL_AUX0+(target-video::ERT_AUX_BUFFER0);
break;
}
glReadBuffer(tgt);
glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, fmt, type, pixels); glReadPixels(0, 0, ScreenSize.Width, ScreenSize.Height, fmt, type, pixels);
testGLError(__LINE__); testGLError(__LINE__);
glReadBuffer(GL_BACK); glReadBuffer(GL_BACK);