Fixes by clang-format (#11056)

Co-authored-by: sigurdp <sigurdp@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-01-12 16:36:04 +01:00 committed by GitHub
parent 60d962bf1e
commit be5ed53fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,12 +71,12 @@ OpenGLWidget::OpenGLWidget( cvf::OpenGLContextGroup* contextGroup,
{
// We need to check if we actually got a context that shares resources with shareWidget.
cvf::ref<cvf::OpenGLContext> shareContext = shareWidget->cvfOpenGLContext();
CVF_ASSERT(myOwnerContextGroup == shareContext->group());
CVF_ASSERT( myOwnerContextGroup == shareContext->group() );
if ( isSharing() )
{
makeCurrent();
myOwnerContextGroup->initializeContextGroup(myContext.p());
myOwnerContextGroup->initializeContextGroup( myContext.p() );
}
else
{
@ -84,14 +84,14 @@ OpenGLWidget::OpenGLWidget( cvf::OpenGLContextGroup* contextGroup,
// since the construction process above has already optimistically added the new context to the
// existing group. In this case, the newly context is basically defunct so we just shut it down
// (which will also remove it from the group)
myOwnerContextGroup->contextAboutToBeShutdown(myContext.p());
myOwnerContextGroup->contextAboutToBeShutdown( myContext.p() );
CVF_ASSERT( myContext->group() == nullptr );
}
}
else
{
makeCurrent();
contextGroup->initializeContextGroup(myContext.p());
contextGroup->initializeContextGroup( myContext.p() );
}
}
}
@ -131,7 +131,7 @@ OpenGLWidget::OpenGLWidget( OpenGLWidget* shareWidget, QWidget* parent, Qt::Wind
{
CVF_ASSERT( myContext->group() == shareContext->group() );
makeCurrent();
myOwnerContextGroup->initializeContextGroup(myContext.p());
myOwnerContextGroup->initializeContextGroup( myContext.p() );
}
}
else
@ -140,7 +140,7 @@ OpenGLWidget::OpenGLWidget( OpenGLWidget* shareWidget, QWidget* parent, Qt::Wind
// the construction process above has already optimistically added the new context to the existing group.
// In this case, the newly context is basically defunct so we just shut it down (which will also remove it
// from the group)
myOwnerContextGroup->contextAboutToBeShutdown(myContext.p());
myOwnerContextGroup->contextAboutToBeShutdown( myContext.p() );
CVF_ASSERT( myContext->group() == nullptr );
}
}
@ -151,8 +151,9 @@ OpenGLWidget::OpenGLWidget( OpenGLWidget* shareWidget, QWidget* parent, Qt::Wind
//--------------------------------------------------------------------------------------------------
cvf::OpenGLContext* OpenGLWidget::cvfOpenGLContext() const
{
const QGLContext* qglContext = context();
const cvfqt::CvfBoundQGLContext_deprecated* contextBinding = dynamic_cast<const cvfqt::CvfBoundQGLContext_deprecated*>( qglContext );
const QGLContext* qglContext = context();
const cvfqt::CvfBoundQGLContext_deprecated* contextBinding =
dynamic_cast<const cvfqt::CvfBoundQGLContext_deprecated*>( qglContext );
CVF_ASSERT( contextBinding );
return contextBinding->cvfOpenGLContext();
@ -171,10 +172,10 @@ void OpenGLWidget::cvfShutdownOpenGLContext()
cvf::OpenGLContextGroup* myOwnerContextGroup = myContext->group();
// If shutdown has already been called, the context is no longer member of any group
if (myOwnerContextGroup)
if ( myOwnerContextGroup )
{
makeCurrent();
myOwnerContextGroup->contextAboutToBeShutdown(myContext.p());
myOwnerContextGroup->contextAboutToBeShutdown( myContext.p() );
}
}
}