Skip to content

Commit 9802e21

Browse files
committed
Avoid warning flood
1 parent 0b67e1a commit 9802e21

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

examples/render/source/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class CustomWindow
3535
public:
3636
CustomWindow()
3737
// Fluid and continuous animations needs continuous repainting
38-
: yup::DocumentWindow (yup::ComponentNative::Options().withFlags(yup::ComponentNative::defaultFlags | yup::ComponentNative::renderContinuous), {})
38+
: yup::DocumentWindow (yup::ComponentNative::Options()
39+
.withFlags(yup::ComponentNative::defaultFlags | yup::ComponentNative::renderContinuous), {})
3940
{
4041
// Set title
4142
setTitle ("main");

modules/yup_graphics/yup_graphics.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@
5353

5454
//==============================================================================
5555

56+
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wattributes")
5657
#include <rive/rive.h>
5758
#include <rive/text/utf.hpp>
58-
59-
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wattributes")
6059
#include <rive/renderer/render_context.hpp>
6160
#include <rive/renderer/render_context_impl.hpp>
6261
JUCE_END_IGNORE_WARNINGS_GCC_LIKE

modules/yup_gui/component/yup_ComponentNative.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ class JUCE_API ComponentNative
5252
return *this;
5353
}
5454

55-
Options& withForcedApi(std::optional<GraphicsContext::Api> newForceContextApi) noexcept
55+
Options& withGraphicsApi(std::optional<GraphicsContext::Api> newGraphicsApi) noexcept
5656
{
57-
forceContextApi = newForceContextApi;
57+
graphicsApi = newGraphicsApi;
5858
return *this;
5959
}
6060

@@ -64,9 +64,9 @@ class JUCE_API ComponentNative
6464
return *this;
6565
}
6666

67-
Flags flags = defaultFlags; ///<
68-
std::optional<GraphicsContext::Api> forceContextApi; ///<
69-
std::optional<float> framerateRedraw; ///<
67+
Flags flags = defaultFlags; ///<
68+
std::optional<GraphicsContext::Api> graphicsApi; ///<
69+
std::optional<float> framerateRedraw; ///<
7070
};
7171

7272
//==============================================================================

modules/yup_gui/native/yup_Windowing_glfw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ GLFWComponentNative::GLFWComponentNative (Component& component,
510510
#endif
511511

512512
// Setup window hints
513-
auto desiredApi = getGraphicsContextApi (options.forceContextApi);
513+
auto desiredApi = getGraphicsContextApi (options.graphicsApi);
514514
setContextWindowHints (desiredApi);
515515

516516
glfwWindowHint (GLFW_VISIBLE, component.isVisible() ? GLFW_TRUE : GLFW_FALSE);

thirdparty/rive_renderer/rive_renderer_emscripten.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222
#include "rive_renderer.h"
2323

24+
#if __clang__
25+
#pragma clang diagnostic push
26+
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
27+
#pragma clang diagnostic ignored "-Wattributes"
28+
#endif
29+
2430
#if RIVE_WEBGPU
2531
#include "source/webgpu/em_js_handle.cpp"
2632
#include "source/webgpu/render_context_webgpu_impl.cpp"
@@ -40,3 +46,7 @@
4046
#error "No renderer backend defined"
4147

4248
#endif
49+
50+
#if __clang__
51+
#pragma clang diagnostic pop
52+
#endif

thirdparty/rive_renderer/rive_renderer_linux.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222
#include "rive_renderer.h"
2323

24+
#if __clang__
25+
#pragma clang diagnostic push
26+
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
27+
#pragma clang diagnostic ignored "-Wattributes"
28+
#endif
29+
2430
#include "source/gl/gl_state.cpp"
2531
#include "source/gl/gl_utils.cpp"
2632
#include "source/gl/load_gles_extensions.cpp"
@@ -31,3 +37,7 @@
3137
#include "source/gl/render_buffer_gl_impl.cpp"
3238
#include "source/gl/render_context_gl_impl.cpp"
3339
#include "source/gl/render_target_gl.cpp"
40+
41+
#if __clang__
42+
#pragma clang diagnostic pop
43+
#endif

0 commit comments

Comments
 (0)