diff --git a/mythtv/libs/libmythtv/Bluray/mythbdbuffer.cpp b/mythtv/libs/libmythtv/Bluray/mythbdbuffer.cpp index f08ff9e9a81..3f17848a7e2 100644 --- a/mythtv/libs/libmythtv/Bluray/mythbdbuffer.cpp +++ b/mythtv/libs/libmythtv/Bluray/mythbdbuffer.cpp @@ -1358,7 +1358,7 @@ MythBDOverlay* MythBDBuffer::GetOverlay(void) void MythBDBuffer::SubmitOverlay(const bd_overlay_s* const Overlay) { - if (!Overlay || (Overlay && (Overlay->plane > m_overlayPlanes.size()))) + if (!Overlay || (Overlay->plane > m_overlayPlanes.size())) return; LOG(VB_PLAYBACK, LOG_DEBUG, QString("--------------------")); @@ -1438,7 +1438,7 @@ void MythBDBuffer::SubmitOverlay(const bd_overlay_s* const Overlay) void MythBDBuffer::SubmitARGBOverlay(const bd_argb_overlay_s * const Overlay) { - if (!Overlay || (Overlay && (Overlay->plane > m_overlayPlanes.size()))) + if (!Overlay || (Overlay->plane > m_overlayPlanes.size())) return; LOG(VB_PLAYBACK, LOG_DEBUG, QString("--------------------")); diff --git a/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp b/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp index 35d02b96bd1..cb2ed058858 100644 --- a/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp @@ -445,7 +445,7 @@ int MythV4L2M2MContext::InitialiseV4L2RequestContext(AVCodecContext *Context) } auto* hwdevicecontext = reinterpret_cast(hwdeviceref->data); - if (!hwdevicecontext || (hwdevicecontext && !hwdevicecontext->hwctx)) + if (!hwdevicecontext || !hwdevicecontext->hwctx) { interop->DecrRef(); return -1; diff --git a/mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp b/mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp index c7641f1cfd9..45fc37acd8f 100644 --- a/mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythvaapicontext.cpp @@ -288,14 +288,14 @@ int MythVAAPIContext::InitialiseContext(AVCodecContext *Context) // Create hardware device context AVBufferRef* hwdeviceref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI); - if (!hwdeviceref || (hwdeviceref && !hwdeviceref->data)) + if (!hwdeviceref || !hwdeviceref->data) { LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to create VAAPI hardware device context"); return -1; } auto* hwdevicecontext = reinterpret_cast(hwdeviceref->data); - if (!hwdevicecontext || (hwdevicecontext && !hwdevicecontext->hwctx)) + if (!hwdevicecontext || !hwdevicecontext->hwctx) return -1; auto *vaapidevicectx = reinterpret_cast(hwdevicecontext->hwctx); if (!vaapidevicectx) diff --git a/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp b/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp index 56e57ee2d26..dcc25eb0790 100644 --- a/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythvdpaucontext.cpp @@ -64,7 +64,7 @@ int MythVDPAUContext::InitialiseContext(AVCodecContext* Context) return -1; auto* hwdevicecontext = reinterpret_cast(hwdeviceref->data); - if (!hwdevicecontext || (hwdevicecontext && !hwdevicecontext->hwctx)) + if (!hwdevicecontext || !hwdevicecontext->hwctx) return -1; // Initialise device context diff --git a/mythtv/libs/libmythtv/io/mythinteractivebuffer.cpp b/mythtv/libs/libmythtv/io/mythinteractivebuffer.cpp index f5c12762108..875127f17f4 100644 --- a/mythtv/libs/libmythtv/io/mythinteractivebuffer.cpp +++ b/mythtv/libs/libmythtv/io/mythinteractivebuffer.cpp @@ -47,7 +47,7 @@ bool MythInteractiveBuffer::OpenFile(const QString &Url, uint /*Retry*/) } QScopedPointer stream(new NetStream(Url, NetStream::kNeverCache)); - if (!stream || (stream && !stream->IsOpen())) + if (!stream || !stream->IsOpen()) { LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to open '%1'").arg(Url)); return false; diff --git a/mythtv/libs/libmythtv/mythframe.h b/mythtv/libs/libmythtv/mythframe.h index 36ec0c32728..eff2dbdecdd 100644 --- a/mythtv/libs/libmythtv/mythframe.h +++ b/mythtv/libs/libmythtv/mythframe.h @@ -488,7 +488,7 @@ static inline int height_for_plane(VideoFrameType Type, int Height, uint Plane) } static inline void clear_vf(VideoFrame *vf) { - if (!vf || (vf && !vf->buf)) + if (!vf || !vf->buf) return; // luma (or RGBA) diff --git a/mythtv/libs/libmythtv/mythvideooutgpu.cpp b/mythtv/libs/libmythtv/mythvideooutgpu.cpp index f9a75b31d1f..75c9ba091d2 100644 --- a/mythtv/libs/libmythtv/mythvideooutgpu.cpp +++ b/mythtv/libs/libmythtv/mythvideooutgpu.cpp @@ -171,7 +171,7 @@ void MythVideoOutputGPU::DoneDisplayingFrame(VideoFrame* Frame) while (m_videoBuffers.Size(kVideoBuffer_pause)) { VideoFrame* frame = m_videoBuffers.Dequeue(kVideoBuffer_pause); - if (!retain || (retain && (frame != Frame))) + if (!retain || (frame != Frame)) release.append(frame); } diff --git a/mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp b/mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp index 0e0cddc5c8f..09fc42ab773 100644 --- a/mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp +++ b/mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp @@ -187,19 +187,19 @@ vector MythOpenGLInterop::Retrieve(MythRenderOpenGL *Context, { // Unpick auto* buffer = reinterpret_cast(Frame->priv[1]); - if (!buffer || (buffer && !buffer->data)) + if (!buffer || !buffer->data) return result; if (Frame->codec == FMT_NVDEC) { auto* context = reinterpret_cast(buffer->data); - if (!context || (context && !context->user_opaque)) + if (!context || !context->user_opaque) return result; interop = reinterpret_cast(context->user_opaque); } else { auto* frames = reinterpret_cast(buffer->data); - if (!frames || (frames && !frames->user_opaque)) + if (!frames || !frames->user_opaque) return result; interop = reinterpret_cast(frames->user_opaque); } diff --git a/mythtv/libs/libmythtv/opengl/mythvdpauinterop.cpp b/mythtv/libs/libmythtv/opengl/mythvdpauinterop.cpp index a8132025e51..ff71a028184 100644 --- a/mythtv/libs/libmythtv/opengl/mythvdpauinterop.cpp +++ b/mythtv/libs/libmythtv/opengl/mythvdpauinterop.cpp @@ -257,10 +257,10 @@ vector MythVDPAUInterop::Acquire(MythRenderOpenGL *Context, return result; auto* buffer = reinterpret_cast(Frame->priv[1]); - if (!buffer || (buffer && !buffer->data)) + if (!buffer || !buffer->data) return result; auto* frames = reinterpret_cast(buffer->data); - if (!frames || (frames && !frames->device_ctx)) + if (!frames || !frames->device_ctx) return result; auto *devicecontext = reinterpret_cast(frames->device_ctx->hwctx); if (!devicecontext) diff --git a/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp b/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp index d1c28cb7f1f..c2e2816f354 100644 --- a/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp +++ b/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp @@ -288,7 +288,7 @@ void MythVideoOutputOpenGL::RenderFrame(VideoFrame* Frame, FrameScanType Scan, O uint8_t gray = m_dbLetterboxColour == kLetterBoxColour_Gray25 ? 64 : 0; - if (!Frame || (Frame && Frame->dummy) || ((m_openglRender->GetExtraFeatures() & kGLTiled) != 0)) + if (!Frame || Frame->dummy || ((m_openglRender->GetExtraFeatures() & kGLTiled) != 0)) { m_openglRender->SetBackground(gray, gray, gray, 255); m_openglRender->ClearFramebuffer(); diff --git a/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp b/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp index 0815fa743dc..b7b7fd6387b 100644 --- a/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp +++ b/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp @@ -663,7 +663,7 @@ int MythRenderOpenGL::GetTextureDataSize(MythGLTexture *Texture) void MythRenderOpenGL::SetTextureFilters(MythGLTexture *Texture, QOpenGLTexture::Filter Filter, QOpenGLTexture::WrapMode Wrap) { - if (!Texture || (Texture && !(Texture->m_texture || Texture->m_textureId))) + if (!Texture || !(Texture->m_texture || Texture->m_textureId)) return; makeCurrent(); @@ -799,7 +799,7 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture *Texture, QOpenGLFramebufferObje { makeCurrent(); - if (!Texture || (Texture && !((Texture->m_texture || Texture->m_textureId) && Texture->m_vbo))) + if (!Texture || !((Texture->m_texture || Texture->m_textureId) && Texture->m_vbo)) return; if (Program == nullptr) @@ -865,7 +865,7 @@ void MythRenderOpenGL::DrawBitmap(std::vector &Textures, Program = m_defaultPrograms[kShaderDefault]; MythGLTexture* first = Textures[0]; - if (!first || (first && !((first->m_texture || first->m_textureId) && first->m_vbo))) + if (!first || !((first->m_texture || first->m_textureId) && first->m_vbo)) return; SetShaderProjection(Program); @@ -1263,7 +1263,7 @@ QStringList MythRenderOpenGL::GetDescription(void) bool MythRenderOpenGL::UpdateTextureVertices(MythGLTexture *Texture, const QRect &Source, const QRect &Destination, int Rotation, qreal Scale) { - if (!Texture || (Texture && Texture->m_size.isEmpty())) + if (!Texture || Texture->m_size.isEmpty()) return false; if ((Texture->m_source == Source) && (Texture->m_destination == Destination) && diff --git a/mythtv/libs/libmythui/vulkan/mythpaintervulkan.cpp b/mythtv/libs/libmythui/vulkan/mythpaintervulkan.cpp index cf87d273b8c..cc578e2ebec 100644 --- a/mythtv/libs/libmythui/vulkan/mythpaintervulkan.cpp +++ b/mythtv/libs/libmythui/vulkan/mythpaintervulkan.cpp @@ -129,7 +129,7 @@ bool MythPainterVulkan::Ready() // device setup can be delayed by a few frames on startup - check status // before continuing auto * window = MythRenderVulkan::GetVulkanRender()->GetVulkanWindow(); - if (!window || (window && !window->device())) + if (!window || !window->device()) return false; m_vulkan = MythVulkanObject::Create(MythRenderVulkan::GetVulkanRender());