Use (void) for function prototypes with no parameters

This is required when compiling these headers as C code. These were
omitted becuase before the addition of examples these headers were
only compiled locally as C++ files where adding the void keyword is
not needed.
This commit is contained in:
Chris Thrasher committed 2023-12-20 15:33:35 -06:00
1 parent 76c1e643fa
commit 843deb2f6b
11 files changed
+16 -16

No files matched your search

+3 -3
View File
@@ -68,7 +68,7 @@ CSFML_AUDIO_API void sfListener_setPosition(sfVector3f position);
/// \return The listener's position
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfListener_getPosition();
CSFML_AUDIO_API sfVector3f sfListener_getPosition(void);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of the forward vector in the scene
@@ -91,7 +91,7 @@ CSFML_AUDIO_API void sfListener_setDirection(sfVector3f direction);
/// \return Listener's forward vector (not normalized)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfListener_getDirection();
CSFML_AUDIO_API sfVector3f sfListener_getDirection(void);
////////////////////////////////////////////////////////////
/// \brief Set the upward vector of the listener in the scene
@@ -114,7 +114,7 @@ CSFML_AUDIO_API void sfListener_setUpVector(sfVector3f upVector);
/// \return Listener's upward vector (not normalized)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API sfVector3f sfListener_getUpVector();
CSFML_AUDIO_API sfVector3f sfListener_getUpVector(void);
#endif // SFML_LISTENER_H
+1 -1
View File
@@ -157,7 +157,7 @@ CSFML_AUDIO_API const char** sfSoundRecorder_getAvailableDevices(size_t* count);
/// \return The name of the default audio capture device (null terminated)
///
////////////////////////////////////////////////////////////
CSFML_AUDIO_API const char* sfSoundRecorder_getDefaultDevice();
CSFML_AUDIO_API const char* sfSoundRecorder_getDefaultDevice(void);
////////////////////////////////////////////////////////////
/// \brief Set the audio capture device
+1 -1
View File
@@ -119,7 +119,7 @@
// ...
// };
//
// CSFML_DEPRECATED void globalFunc();
// CSFML_DEPRECATED void globalFunc(void);
////////////////////////////////////////////////////////////
#if defined(CSFML_NO_DEPRECATED_WARNINGS)
+1 -1
View File
@@ -50,6 +50,6 @@ typedef struct
/// \brief Define the default values for a RenderState
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfRenderStates sfRenderStates_default();
CSFML_GRAPHICS_API sfRenderStates sfRenderStates_default(void);
#endif // SFML_RENDERSTATES_H
+1 -1
View File
@@ -326,7 +326,7 @@ CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_getTexture(const sfRenderTex
/// \return The maximum anti-aliasing level supported by the system
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API unsigned int sfRenderTexture_getMaximumAntialiasingLevel();
CSFML_GRAPHICS_API unsigned int sfRenderTexture_getMaximumAntialiasingLevel(void);
////////////////////////////////////////////////////////////
/// \brief Enable or disable the smooth filter on a render texture
+1 -1
View File
@@ -403,7 +403,7 @@ CSFML_GRAPHICS_API void sfTexture_bind(const sfTexture* texture, sfTextureCoordi
/// \return Maximum size allowed for textures, in pixels
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API unsigned int sfTexture_getMaximumSize();
CSFML_GRAPHICS_API unsigned int sfTexture_getMaximumSize(void);
#endif // SFML_TEXTURE_H
+1 -1
View File
@@ -248,7 +248,7 @@ CSFML_GRAPHICS_API void sfVertexBuffer_bind(const sfVertexBuffer* vertexBuffer);
/// \return True if vertex buffers are supported, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_GRAPHICS_API sfBool sfVertexBuffer_isAvailable();
CSFML_GRAPHICS_API sfBool sfVertexBuffer_isAvailable(void);
#endif // SFML_VERTEXBUFFER_H
+1 -1
View File
@@ -203,7 +203,7 @@ CSFML_NETWORK_API sfSocketStatus sfUdpSocket_receivePacket(sfUdpSocket* socket,
/// \return The maximum size of a UDP datagram (message)
///
////////////////////////////////////////////////////////////
CSFML_NETWORK_API unsigned int sfUdpSocket_maxDatagramSize();
CSFML_NETWORK_API unsigned int sfUdpSocket_maxDatagramSize(void);
#endif // SFML_UDPSOCKET_H
+2 -2
View File
@@ -42,7 +42,7 @@
/// \return Clipboard contents as a locale-dependent ANSI string
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API const char* sfClipboard_getString();
CSFML_WINDOW_API const char* sfClipboard_getString(void);
////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ CSFML_WINDOW_API const char* sfClipboard_getString();
/// \return Clipboard contents as UTF-32
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API const sfUint32* sfClipboard_getUnicodeString();
CSFML_WINDOW_API const sfUint32* sfClipboard_getUnicodeString(void);
////////////////////////////////////////////////////////////
/// \brief Set the content of the clipboard as ANSI string data
+2 -2
View File
@@ -32,7 +32,7 @@
#include <SFML/Window/Types.h>
#include <SFML/Window/Window.h>
typedef void (*GlFunctionPointer)();
typedef void (*GlFunctionPointer)(void);
////////////////////////////////////////////////////////////
/// \brief Create a new context
@@ -104,6 +104,6 @@ CSFML_WINDOW_API sfContextSettings sfContext_getSettings(const sfContext* contex
/// \return The active context's ID or 0 if no context is currently active
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API sfUint64 sfContext_getActiveContextId();
CSFML_WINDOW_API sfUint64 sfContext_getActiveContextId(void);
#endif // SFML_CONTEXT_H
+2 -2
View File
@@ -43,7 +43,7 @@ typedef uint64_t VkSurfaceKHR;
typedef struct VkAllocationCallbacks VkAllocationCallbacks;
typedef void (*sfVulkanFunctionPointer)();
typedef void (*sfVulkanFunctionPointer)(void);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not the system supports Vulkan
@@ -79,4 +79,4 @@ CSFML_WINDOW_API sfVulkanFunctionPointer sfVulkan_getFunction(const char* name);
/// \return Vulkan instance extensions required for graphics
///
////////////////////////////////////////////////////////////
CSFML_WINDOW_API const char* const* sfVulkan_getGraphicsRequiredInstanceExtensions();
CSFML_WINDOW_API const char* const* sfVulkan_getGraphicsRequiredInstanceExtensions(void);