Skip to content

Commit 7b501ae

Browse files
committed
Add a few include guards to private headers
1 parent 06cafa3 commit 7b501ae

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

src/process/SDL_sysprocess.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
*/
2121
#include "SDL_internal.h"
2222

23+
#ifndef SDL_sysprocess_h_
24+
#define SDL_sysprocess_h_
25+
2326
typedef struct SDL_ProcessData SDL_ProcessData;
2427

2528
struct SDL_Process
@@ -35,3 +38,5 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
3538
bool SDL_SYS_KillProcess(SDL_Process *process, bool force);
3639
bool SDL_SYS_WaitProcess(SDL_Process *process, bool block, int *exitcode);
3740
void SDL_SYS_DestroyProcess(SDL_Process *process);
41+
42+
#endif // SDL_sysprocess_h_

test/gamepadutils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
/* Gamepad image */
1414

15+
#ifndef gamepadutils_h_
16+
#define gamepadutils_h_
17+
1518
typedef struct GamepadImage GamepadImage;
1619

1720
typedef enum
@@ -210,3 +213,5 @@ extern bool MappingHasBinding(const char *mapping, const char *binding);
210213

211214
/* Clear any previous binding */
212215
extern char *ClearMappingBinding(char *mapping, const char *binding);
216+
217+
#endif /* gamepadutils_h_ */

test/testautomation_images.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
/* Defines some images for tests */
1414

15+
#ifndef testautomation_images_h_
16+
#define testautomation_images_h_
17+
1518
/**
1619
* Type for test images.
1720
*/
@@ -32,3 +35,5 @@ extern SDL_Surface *SDLTest_ImagePrimitives(void);
3235
extern SDL_Surface *SDLTest_ImageBlendingBackground(void);
3336
extern SDL_Surface *SDLTest_ImageBlendingSprite(void);
3437
extern SDL_Surface *SDLTest_ImageWrappingSprite(void);
38+
39+
#endif // testautomation_images_h_

test/testnative.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
integration with native windows
1515
*/
1616

17+
#ifndef testnative_h_
18+
#define testnative_h_
19+
1720
#include <SDL3/SDL.h>
1821

1922
#include "SDL_build_config.h"
@@ -44,3 +47,5 @@ extern NativeWindowFactory X11WindowFactory;
4447
#define TEST_NATIVE_COCOA
4548
extern NativeWindowFactory CocoaWindowFactory;
4649
#endif
50+
51+
#endif // testnative_h_

test/testyuv_cvt.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
/* These functions are designed for testing correctness, not for speed */
1414

15+
#ifndef testyuv_cvt_h_
16+
#define testyuv_cvt_h_
17+
1518
typedef enum
1619
{
1720
YUV_CONVERSION_JPEG, /**< Full range JPEG */
@@ -26,3 +29,5 @@ extern YUV_CONVERSION_MODE GetYUVConversionModeForResolution(int width, int heig
2629
extern SDL_Colorspace GetColorspaceForYUVConversionMode(YUV_CONVERSION_MODE mode);
2730
extern bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, YUV_CONVERSION_MODE mode, int monochrome, int luminance);
2831
extern int CalculateYUVPitch(Uint32 format, int width);
32+
33+
#endif /* testyuv_cvt_h_ */

0 commit comments

Comments
 (0)