YACReaderFlowGL: initialize data member texture pointers

Moving the initialization of defaultTexture out of the member
initializer list gets rid of a GCC's -Wreorder warning.

Initialize other texture pointers to improve safety and consistency.
This commit is contained in:
Igor Kushnir 2021-02-05 17:42:56 +02:00 committed by Felix Kauselmann
parent b87be81037
commit 21c3bda5d4
2 changed files with 4 additions and 4 deletions

View File

@ -190,7 +190,7 @@ struct Preset pressetYACReaderFlowDownConfig = {
};
/*Constructor*/
YACReaderFlowGL::YACReaderFlowGL(QWidget *parent, struct Preset p)
: QOpenGLWidget(/*QOpenGLWidget migration QGLFormat(QGL::SampleBuffers),*/ parent), numObjects(0), lazyPopulateObjects(-1), defaultTexture(nullptr), hasBeenInitialized(false), bUseVSync(false), flowRightToLeft(false)
: QOpenGLWidget(/*QOpenGLWidget migration QGLFormat(QGL::SampleBuffers),*/ parent), numObjects(0), lazyPopulateObjects(-1), hasBeenInitialized(false), bUseVSync(false), flowRightToLeft(false)
{
updateCount = 0;
config = p;

View File

@ -119,9 +119,9 @@ protected:
int updateCount;
int fontSize;
QOpenGLTexture *defaultTexture;
QOpenGLTexture *markTexture;
QOpenGLTexture *readingTexture;
QOpenGLTexture *defaultTexture = nullptr;
QOpenGLTexture *markTexture = nullptr;
QOpenGLTexture *readingTexture = nullptr;
void initializeGL();
void paintGL();
void timerEvent(QTimerEvent *);