Skip to content
Snippets Groups Projects
Commit bdfe4333 authored by Jeremy Whiting's avatar Jeremy Whiting
Browse files

Merge branch 'wip/smcv/move-static-assert' into 'master'

Move static assertion to the place where it matters

See merge request steam/steam-runtime-tools!38
parents 5d4b0011 ebbbc943
No related branches found
No related tags found
1 merge request!38Move static assertion to the place where it matters
Pipeline #1542 passed
...@@ -92,6 +92,7 @@ _srt_graphics_new (const char *multiarch_tuple, ...@@ -92,6 +92,7 @@ _srt_graphics_new (const char *multiarch_tuple,
static inline int _srt_graphics_hash_key(SrtWindowSystem window_system, static inline int _srt_graphics_hash_key(SrtWindowSystem window_system,
SrtRenderingInterface rendering_interface) SrtRenderingInterface rendering_interface)
{ {
G_STATIC_ASSERT (SRT_N_RENDERING_INTERFACES < 100);
/* This allows us to have up to 100 unique renderers, we won't need nearly that /* This allows us to have up to 100 unique renderers, we won't need nearly that
many, but setting to 100 just to allow room to grow */ many, but setting to 100 just to allow room to grow */
return (int)window_system * 100 + (int)rendering_interface; return (int)window_system * 100 + (int)rendering_interface;
......
...@@ -94,8 +94,6 @@ typedef enum ...@@ -94,8 +94,6 @@ typedef enum
#define SRT_N_RENDERING_INTERFACES (SRT_RENDERING_INTERFACE_GLESV2 + 1) #define SRT_N_RENDERING_INTERFACES (SRT_RENDERING_INTERFACE_GLESV2 + 1)
G_STATIC_ASSERT (SRT_N_RENDERING_INTERFACES < 100);
const char *srt_graphics_get_multiarch_tuple (SrtGraphics *self); const char *srt_graphics_get_multiarch_tuple (SrtGraphics *self);
SrtGraphicsIssues srt_graphics_get_issues (SrtGraphics *self); SrtGraphicsIssues srt_graphics_get_issues (SrtGraphics *self);
SrtWindowSystem srt_graphics_get_window_system (SrtGraphics *self); SrtWindowSystem srt_graphics_get_window_system (SrtGraphics *self);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment