mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windows: Fix build warnings when JUCE_DISABLE_ASSERTIONS is set
This commit is contained in:
parent
6e9b7dad9a
commit
8754d87900
6 changed files with 13 additions and 16 deletions
|
|
@ -263,7 +263,7 @@ void AudioPluginInstance::addHostedParameterGroup (std::unique_ptr<AudioProcesso
|
|||
// garbage and your host will crash and burn
|
||||
for (auto* param : group->getParameters (true))
|
||||
{
|
||||
jassert (dynamic_cast<HostedParameter*> (param) != nullptr);
|
||||
jassertquiet (dynamic_cast<HostedParameter*> (param) != nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ void AudioPluginInstance::setHostedParameterTree (AudioProcessorParameterGroup g
|
|||
// garbage and your host will crash and burn
|
||||
for (auto* param : group.getParameters (true))
|
||||
{
|
||||
jassert (dynamic_cast<HostedParameter*> (param) != nullptr);
|
||||
jassertquiet (dynamic_cast<HostedParameter*> (param) != nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ namespace
|
|||
Rectangle<Type> coordsToRectangle (Type x, Type y, Type w, Type h) noexcept
|
||||
{
|
||||
#if JUCE_DEBUG
|
||||
const int maxVal = 0x3fffffff;
|
||||
constexpr int maxVal = 0x3fffffff;
|
||||
|
||||
jassert ((int) x >= -maxVal && (int) x <= maxVal
|
||||
&& (int) y >= -maxVal && (int) y <= maxVal
|
||||
&& (int) w >= 0 && (int) w <= maxVal
|
||||
&& (int) h >= 0 && (int) h <= maxVal);
|
||||
jassertquiet ((int) x >= -maxVal && (int) x <= maxVal
|
||||
&& (int) y >= -maxVal && (int) y <= maxVal
|
||||
&& (int) w >= 0 && (int) w <= maxVal
|
||||
&& (int) h >= 0 && (int) h <= maxVal);
|
||||
#endif
|
||||
|
||||
return { x, y, w, h };
|
||||
|
|
|
|||
|
|
@ -421,14 +421,12 @@ struct Direct2DBitmap
|
|||
|
||||
JUCE_D2DMETRICS_SCOPED_ELAPSED_TIME (Direct2DMetricsHub::getInstance()->imageContextMetrics, createBitmapTime);
|
||||
|
||||
#if JUCE_DEBUG
|
||||
// Verify that the GPU can handle a bitmap of this size
|
||||
//
|
||||
// If you need a bitmap larger than this, you'll need to either split it up into multiple bitmaps
|
||||
// or use a software image (see SoftwareImageType).
|
||||
auto maxBitmapSize = deviceContext->GetMaximumBitmapSize();
|
||||
jassert (size.width <= maxBitmapSize && size.height <= maxBitmapSize);
|
||||
#endif
|
||||
const auto maxBitmapSize = deviceContext->GetMaximumBitmapSize();
|
||||
jassertquiet (size.width <= maxBitmapSize && size.height <= maxBitmapSize);
|
||||
|
||||
const auto pixelFormat = D2D1::PixelFormat (format == Image::SingleChannel
|
||||
? DXGI_FORMAT_A8_UNORM
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ void* getUser32Function (const char*);
|
|||
|
||||
#if JUCE_DEBUG
|
||||
int numActiveScopedDpiAwarenessDisablers = 0;
|
||||
static bool isInScopedDPIAwarenessDisabler() { return numActiveScopedDpiAwarenessDisablers > 0; }
|
||||
extern HWND juce_messageWindowHandle;
|
||||
#endif
|
||||
|
||||
|
|
@ -2465,7 +2464,7 @@ private:
|
|||
// You normally want these to match otherwise timer events and async messages will happen
|
||||
// in a different context to normal HWND messages which can cause issues with UI scaling.
|
||||
jassert (isPerMonitorDPIAwareWindow (hwnd) == isPerMonitorDPIAwareWindow (juce_messageWindowHandle)
|
||||
|| isInScopedDPIAwarenessDisabler());
|
||||
|| numActiveScopedDpiAwarenessDisablers > 0);
|
||||
#endif
|
||||
|
||||
if (hwnd != nullptr)
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ JUCE_GL_EXTENSION_FUNCTIONS
|
|||
JUCE_GL_VERTEXBUFFER_FUNCTIONS
|
||||
#undef X
|
||||
|
||||
#if JUCE_DEBUG && ! defined (JUCE_CHECK_OPENGL_ERROR)
|
||||
#if JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS && ! defined (JUCE_CHECK_OPENGL_ERROR)
|
||||
static const char* getGLErrorMessage (const GLenum e) noexcept
|
||||
{
|
||||
switch (e)
|
||||
|
|
@ -197,7 +197,7 @@ static bool checkPeerIsValid (OpenGLContext* context)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void checkGLError (const char* file, const int line)
|
||||
static void checkGLError ([[maybe_unused]] const char* file, [[maybe_unused]] const int line)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ public:
|
|||
|
||||
gl::loadFunctions();
|
||||
|
||||
#if JUCE_DEBUG
|
||||
#if JUCE_DEBUG && ! JUCE_DISABLE_ASSERTIONS
|
||||
if (getOpenGLVersion() >= Version { 4, 3 } && glDebugMessageCallback != nullptr)
|
||||
{
|
||||
glEnable (GL_DEBUG_OUTPUT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue