mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some GCC compiler warnings and removed deprecated functions
This commit is contained in:
parent
ddd4e84b9e
commit
16dd26649a
109 changed files with 381 additions and 289 deletions
|
|
@ -164,21 +164,21 @@ public:
|
|||
bool makeActive() const noexcept
|
||||
{
|
||||
ScopedXLock xlock (display);
|
||||
return renderContext != 0
|
||||
return renderContext != nullptr
|
||||
&& glXMakeCurrent (display, embeddedWindow, renderContext);
|
||||
}
|
||||
|
||||
bool isActive() const noexcept
|
||||
{
|
||||
ScopedXLock xlock (display);
|
||||
return glXGetCurrentContext() == renderContext && renderContext != 0;
|
||||
return glXGetCurrentContext() == renderContext && renderContext != nullptr;
|
||||
}
|
||||
|
||||
static void deactivateCurrentContext()
|
||||
{
|
||||
ScopedXDisplay xDisplay;
|
||||
ScopedXLock xlock (xDisplay.display);
|
||||
glXMakeCurrent (xDisplay.display, None, 0);
|
||||
glXMakeCurrent (xDisplay.display, None, nullptr);
|
||||
}
|
||||
|
||||
void swapBuffers()
|
||||
|
|
@ -255,7 +255,7 @@ bool OpenGLHelpers::isContextActive()
|
|||
if (xDisplay.display)
|
||||
{
|
||||
ScopedXLock xlock (xDisplay.display);
|
||||
return glXGetCurrentContext() != 0;
|
||||
return glXGetCurrentContext() != nullptr;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -702,6 +702,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
using ComponentMovementWatcher::componentMovedOrResized;
|
||||
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
detach();
|
||||
|
|
@ -725,6 +727,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
using ComponentMovementWatcher::componentVisibilityChanged;
|
||||
|
||||
#if JUCE_DEBUG || JUCE_LOG_ASSERTIONS
|
||||
void componentBeingDeleted (Component& c) override
|
||||
{
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ private:
|
|||
static void verticalRowFlip (PixelARGB* const data, const int w, const int h)
|
||||
{
|
||||
HeapBlock<PixelARGB> tempRow (w);
|
||||
auto rowSize = sizeof (PixelARGB) * (size_t) w;
|
||||
auto rowSize = (size_t) w * sizeof (PixelARGB);
|
||||
|
||||
for (int y = 0; y < h / 2; ++y)
|
||||
{
|
||||
|
|
@ -126,7 +126,7 @@ private:
|
|||
void write (const PixelARGB* const data) const noexcept
|
||||
{
|
||||
HeapBlock<PixelARGB> invertedCopy (area.getWidth() * area.getHeight());
|
||||
auto rowSize = sizeof (PixelARGB) * (size_t) area.getWidth();
|
||||
auto rowSize = (size_t) area.getWidth() * sizeof (PixelARGB);
|
||||
|
||||
for (int y = 0; y < area.getHeight(); ++y)
|
||||
memcpy (invertedCopy + area.getWidth() * y,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue