Skip to content

Commit

Permalink
tidy: Fix virtual calls from object destructors.
Browse files Browse the repository at this point in the history
Clang-tidy complains that several functions are calling virtual
functions from their destructors.  During constructors and destructors
virtual functions aren't virtual, calling the function in that class
and not any derived class.  Add the class name to these calls to
eliminate the warning messages.

https://clang.llvm.org/extra/clang-tidy/checks/clang-analyzer-optin.cplusplus.VirtualCall.html
  • Loading branch information
linuxdude42 committed Dec 6, 2019
1 parent 01d2547 commit cc86ec5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythvideoout.cpp
Expand Up @@ -269,7 +269,7 @@ MythVideoOutput::MythVideoOutput()
MythVideoOutput::~MythVideoOutput()
{
delete m_dbDisplayProfile;
ResizeForGui();
MythVideoOutput::ResizeForGui();
if (m_display)
MythDisplay::AcquireRelease(false);
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythdrmprimeinterop.cpp
Expand Up @@ -18,7 +18,7 @@ MythDRMPRIMEInterop::MythDRMPRIMEInterop(MythRenderOpenGL *Context)

MythDRMPRIMEInterop::~MythDRMPRIMEInterop()
{
DeleteTextures();
MythDRMPRIMEInterop::DeleteTextures();
}

void MythDRMPRIMEInterop::DeleteTextures(void)
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythopenglinterop.cpp
Expand Up @@ -210,7 +210,7 @@ MythOpenGLInterop::MythOpenGLInterop(MythRenderOpenGL *Context, Type InteropType

MythOpenGLInterop::~MythOpenGLInterop()
{
DeleteTextures();
MythOpenGLInterop::DeleteTextures();
if (m_context)
m_context->DecrRef();
}
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/opengl/mythvaapidrminterop.cpp
Expand Up @@ -53,8 +53,8 @@ MythVAAPIInteropDRM::~MythVAAPIInteropDRM()
CleanupDRMPRIME();

CleanupReferenceFrames();
DestroyDeinterlacer();
DeleteTextures();
MythVAAPIInteropDRM::DestroyDeinterlacer();
MythVAAPIInteropDRM::DeleteTextures();

if (m_drmFile.isOpen())
m_drmFile.close();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/opengl/mythvaapiinterop.cpp
Expand Up @@ -79,7 +79,7 @@ MythVAAPIInterop::MythVAAPIInterop(MythRenderOpenGL *Context, Type InteropType)

MythVAAPIInterop::~MythVAAPIInterop()
{
DestroyDeinterlacer();
MythVAAPIInterop::DestroyDeinterlacer();
if (m_vaDisplay)
if (vaTerminate(m_vaDisplay) != VA_STATUS_SUCCESS)
LOG(VB_GENERAL, LOG_WARNING, LOC + "Error closing VAAPI display");
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp
Expand Up @@ -158,7 +158,7 @@ MythVideoOutputOpenGL::MythVideoOutputOpenGL(QString Profile)

MythVideoOutputOpenGL::~MythVideoOutputOpenGL()
{
DestroyBuffers();
MythVideoOutputOpenGL::DestroyBuffers();
while (!m_openGLVideoPiPs.empty())
{
delete *m_openGLVideoPiPs.begin();
Expand All @@ -180,7 +180,7 @@ MythVideoOutputOpenGL::~MythVideoOutputOpenGL()

void MythVideoOutputOpenGL::DestroyBuffers(void)
{
DiscardFrames(true, true);
MythVideoOutputOpenGL::DiscardFrames(true, true);
m_videoBuffers.DeleteBuffers();
m_videoBuffers.Reset();
m_buffersCreated = false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/opengl/mythpainteropengl.cpp
Expand Up @@ -25,7 +25,7 @@ MythOpenGLPainter::~MythOpenGLPainter()
if (VERBOSE_LEVEL_CHECK(VB_GPU, LOG_INFO))
m_render->logDebugMarker("PAINTER_RELEASE_START");
Teardown();
FreeResources();
MythOpenGLPainter::FreeResources();
if (VERBOSE_LEVEL_CHECK(VB_GPU, LOG_INFO))
m_render->logDebugMarker("PAINTER_RELEASE_END");
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/opengl/mythrenderopengl.cpp
Expand Up @@ -149,7 +149,7 @@ MythRenderOpenGL::~MythRenderOpenGL()
if (!isValid())
return;
disconnect(this, &QOpenGLContext::aboutToBeDestroyed, this, &MythRenderOpenGL::contextToBeDestroyed);
ReleaseResources();
MythRenderOpenGL::ReleaseResources();
}

void MythRenderOpenGL::messageLogged(const QOpenGLDebugMessage &Message)
Expand Down

0 comments on commit cc86ec5

Please sign in to comment.