Skip to content

Commit

Permalink
Explicitly cast to const to avoid deprecated functions on Qt 5.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ervanalb committed Jul 20, 2019
1 parent 8aaabfe commit 9b0c43e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void Audio::renderGraphics() {
m_spectrumTexture->setWrapMode(QOpenGLTexture::ClampToEdge);
m_spectrumTexture->allocateStorage();
}
m_waveformTexture->setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, &waveformGL[waveformPtr * 4]);
m_waveformBeatsTexture->setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, &waveformBeatsGL[waveformPtr * 4]);
m_spectrumTexture->setData(QOpenGLTexture::Red, QOpenGLTexture::Float32, spectrumGL.data());
m_waveformTexture->setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, (const void*)&waveformGL[waveformPtr * 4]);
m_waveformBeatsTexture->setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, (const void*)&waveformBeatsGL[waveformPtr * 4]);
m_spectrumTexture->setData(QOpenGLTexture::Red, QOpenGLTexture::Float32, (const void*)spectrumGL.data());
}
4 changes: 2 additions & 2 deletions src/Chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ GLuint Chain::noiseTexture() {
return (xsr() >> 11) * div;
};
std::generate(&data[0],&data[compCount],xsrd);
m_noiseTexture.setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, &data[0]);
m_noiseTexture.setData(QOpenGLTexture::RGBA, QOpenGLTexture::Float32, (const void*)&data[0]);
glFlush();
}

Expand All @@ -68,7 +68,7 @@ GLuint Chain::blankTexture() {
m_blankTexture.setWrapMode(QOpenGLTexture::Repeat);

auto data = std::array<uint8_t,4>();
m_blankTexture.setData(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, &data[0]);
m_blankTexture.setData(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)&data[0]);
}

return m_blankTexture.textureId();
Expand Down
2 changes: 1 addition & 1 deletion src/LightOutputNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ void LightOutputNodeOpenGLWorker::initialize() {
p->m_geometry2D.setWrapMode(QOpenGLTexture::Repeat);

auto data = std::array<uint8_t,4>();
p->m_geometry2D.setData(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, &data[0]);
p->m_geometry2D.setData(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, (const void*)&data[0]);
p->m_displayMode = LightOutputNode::DisplayLookup2D;
}

Expand Down

0 comments on commit 9b0c43e

Please sign in to comment.