From af677f70c1ff71a2518e61e5ca875405222f32f3 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Tue, 19 Dec 2023 22:32:06 -0600 Subject: [PATCH] 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. --- include/SFML/Audio/Listener.h | 6 +++--- include/SFML/Audio/SoundRecorder.h | 2 +- include/SFML/Config.h | 2 +- include/SFML/Graphics/RenderStates.h | 2 +- include/SFML/Graphics/RenderTexture.h | 2 +- include/SFML/Graphics/Texture.h | 2 +- include/SFML/Graphics/VertexBuffer.h | 2 +- include/SFML/Network/UdpSocket.h | 2 +- include/SFML/Window/Clipboard.h | 4 ++-- include/SFML/Window/Context.h | 4 ++-- include/SFML/Window/Vulkan.h | 4 ++-- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/SFML/Audio/Listener.h b/include/SFML/Audio/Listener.h index 10a0874a..2a875a4d 100644 --- a/include/SFML/Audio/Listener.h +++ b/include/SFML/Audio/Listener.h @@ -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 diff --git a/include/SFML/Audio/SoundRecorder.h b/include/SFML/Audio/SoundRecorder.h index 9fa9c800..d26ba0c9 100644 --- a/include/SFML/Audio/SoundRecorder.h +++ b/include/SFML/Audio/SoundRecorder.h @@ -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 diff --git a/include/SFML/Config.h b/include/SFML/Config.h index 04261f42..d6f74bf1 100644 --- a/include/SFML/Config.h +++ b/include/SFML/Config.h @@ -119,7 +119,7 @@ // ... // }; // -// CSFML_DEPRECATED void globalFunc(); +// CSFML_DEPRECATED void globalFunc(void); //////////////////////////////////////////////////////////// #if defined(CSFML_NO_DEPRECATED_WARNINGS) diff --git a/include/SFML/Graphics/RenderStates.h b/include/SFML/Graphics/RenderStates.h index 5bb7bf08..435f6aae 100644 --- a/include/SFML/Graphics/RenderStates.h +++ b/include/SFML/Graphics/RenderStates.h @@ -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 diff --git a/include/SFML/Graphics/RenderTexture.h b/include/SFML/Graphics/RenderTexture.h index fc7f5f14..e026eb07 100644 --- a/include/SFML/Graphics/RenderTexture.h +++ b/include/SFML/Graphics/RenderTexture.h @@ -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 diff --git a/include/SFML/Graphics/Texture.h b/include/SFML/Graphics/Texture.h index ab7adb2b..19b1b9a9 100644 --- a/include/SFML/Graphics/Texture.h +++ b/include/SFML/Graphics/Texture.h @@ -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 diff --git a/include/SFML/Graphics/VertexBuffer.h b/include/SFML/Graphics/VertexBuffer.h index d7f3d0df..182a5d09 100644 --- a/include/SFML/Graphics/VertexBuffer.h +++ b/include/SFML/Graphics/VertexBuffer.h @@ -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 diff --git a/include/SFML/Network/UdpSocket.h b/include/SFML/Network/UdpSocket.h index abf05ff6..bb42b9bc 100644 --- a/include/SFML/Network/UdpSocket.h +++ b/include/SFML/Network/UdpSocket.h @@ -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 diff --git a/include/SFML/Window/Clipboard.h b/include/SFML/Window/Clipboard.h index f21f00ae..c2a60d30 100644 --- a/include/SFML/Window/Clipboard.h +++ b/include/SFML/Window/Clipboard.h @@ -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 diff --git a/include/SFML/Window/Context.h b/include/SFML/Window/Context.h index 689826b3..c7bfca5c 100644 --- a/include/SFML/Window/Context.h +++ b/include/SFML/Window/Context.h @@ -32,7 +32,7 @@ #include #include -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 diff --git a/include/SFML/Window/Vulkan.h b/include/SFML/Window/Vulkan.h index 45a1b1a2..187b4393 100644 --- a/include/SFML/Window/Vulkan.h +++ b/include/SFML/Window/Vulkan.h @@ -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);