From 55fe064af40c2e87afb5eaf4dced277bc9fb986a Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 24 Aug 2024 10:47:11 -0600 Subject: [PATCH] Remove unnecessary `(void)` parameters from C++ implementations --- src/CSFML/Audio/Listener.cpp | 2 +- src/CSFML/Audio/SoundBufferRecorder.cpp | 2 +- src/CSFML/Audio/SoundRecorder.cpp | 2 +- src/CSFML/Graphics/CircleShape.cpp | 2 +- src/CSFML/Graphics/ConvexShape.cpp | 2 +- src/CSFML/Graphics/RectangleShape.cpp | 2 +- src/CSFML/Graphics/Shader.cpp | 4 ++-- src/CSFML/Graphics/Transformable.cpp | 2 +- src/CSFML/Graphics/VertexArray.cpp | 2 +- src/CSFML/Graphics/View.cpp | 2 +- src/CSFML/Network/Ftp.cpp | 2 +- src/CSFML/Network/Http.cpp | 4 ++-- src/CSFML/Network/IpAddress.cpp | 2 +- src/CSFML/Network/Packet.cpp | 2 +- src/CSFML/Network/SocketSelector.cpp | 2 +- src/CSFML/Network/TcpListener.cpp | 2 +- src/CSFML/Network/TcpSocket.cpp | 2 +- src/CSFML/Network/UdpSocket.cpp | 2 +- src/CSFML/System/Buffer.cpp | 2 +- src/CSFML/System/Clock.cpp | 2 +- src/CSFML/Window/Context.cpp | 2 +- src/CSFML/Window/Joystick.cpp | 2 +- src/CSFML/Window/VideoMode.cpp | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/CSFML/Audio/Listener.cpp b/src/CSFML/Audio/Listener.cpp index 51246d17..86a49563 100644 --- a/src/CSFML/Audio/Listener.cpp +++ b/src/CSFML/Audio/Listener.cpp @@ -38,7 +38,7 @@ void sfListener_setGlobalVolume(float volume) //////////////////////////////////////////////////////////// -float sfListener_getGlobalVolume(void) +float sfListener_getGlobalVolume() { return sf::Listener::getGlobalVolume(); } diff --git a/src/CSFML/Audio/SoundBufferRecorder.cpp b/src/CSFML/Audio/SoundBufferRecorder.cpp index 10dfbfee..73f9c7f9 100644 --- a/src/CSFML/Audio/SoundBufferRecorder.cpp +++ b/src/CSFML/Audio/SoundBufferRecorder.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfSoundBufferRecorder* sfSoundBufferRecorder_create(void) +sfSoundBufferRecorder* sfSoundBufferRecorder_create() { return new sfSoundBufferRecorder; } diff --git a/src/CSFML/Audio/SoundRecorder.cpp b/src/CSFML/Audio/SoundRecorder.cpp index 67914c25..6aa5580e 100644 --- a/src/CSFML/Audio/SoundRecorder.cpp +++ b/src/CSFML/Audio/SoundRecorder.cpp @@ -69,7 +69,7 @@ unsigned int sfSoundRecorder_getSampleRate(const sfSoundRecorder* soundRecorder) //////////////////////////////////////////////////////////// -bool sfSoundRecorder_isAvailable(void) +bool sfSoundRecorder_isAvailable() { return sf::SoundRecorder::isAvailable(); } diff --git a/src/CSFML/Graphics/CircleShape.cpp b/src/CSFML/Graphics/CircleShape.cpp index 626de93e..a5180a5c 100644 --- a/src/CSFML/Graphics/CircleShape.cpp +++ b/src/CSFML/Graphics/CircleShape.cpp @@ -33,7 +33,7 @@ //////////////////////////////////////////////////////////// -sfCircleShape* sfCircleShape_create(void) +sfCircleShape* sfCircleShape_create() { sfCircleShape* shape = new sfCircleShape; shape->Texture = nullptr; diff --git a/src/CSFML/Graphics/ConvexShape.cpp b/src/CSFML/Graphics/ConvexShape.cpp index c63f9fa3..96f9a439 100644 --- a/src/CSFML/Graphics/ConvexShape.cpp +++ b/src/CSFML/Graphics/ConvexShape.cpp @@ -33,7 +33,7 @@ //////////////////////////////////////////////////////////// -sfConvexShape* sfConvexShape_create(void) +sfConvexShape* sfConvexShape_create() { return new sfConvexShape; } diff --git a/src/CSFML/Graphics/RectangleShape.cpp b/src/CSFML/Graphics/RectangleShape.cpp index 8ba8f17c..d7e856bb 100644 --- a/src/CSFML/Graphics/RectangleShape.cpp +++ b/src/CSFML/Graphics/RectangleShape.cpp @@ -33,7 +33,7 @@ //////////////////////////////////////////////////////////// -sfRectangleShape* sfRectangleShape_create(void) +sfRectangleShape* sfRectangleShape_create() { return new sfRectangleShape; } diff --git a/src/CSFML/Graphics/Shader.cpp b/src/CSFML/Graphics/Shader.cpp index 04cc8c7b..25bdd7f0 100644 --- a/src/CSFML/Graphics/Shader.cpp +++ b/src/CSFML/Graphics/Shader.cpp @@ -389,14 +389,14 @@ void sfShader_bind(const sfShader* shader) //////////////////////////////////////////////////////////// -bool sfShader_isAvailable(void) +bool sfShader_isAvailable() { return sf::Shader::isAvailable(); } //////////////////////////////////////////////////////////// -bool sfShader_isGeometryAvailable(void) +bool sfShader_isGeometryAvailable() { return sf::Shader::isGeometryAvailable(); } diff --git a/src/CSFML/Graphics/Transformable.cpp b/src/CSFML/Graphics/Transformable.cpp index 166c51e9..3d91a898 100644 --- a/src/CSFML/Graphics/Transformable.cpp +++ b/src/CSFML/Graphics/Transformable.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////// -sfTransformable* sfTransformable_create(void) +sfTransformable* sfTransformable_create() { sfTransformable* transformable = new sfTransformable; diff --git a/src/CSFML/Graphics/VertexArray.cpp b/src/CSFML/Graphics/VertexArray.cpp index e6f962b0..069561d8 100644 --- a/src/CSFML/Graphics/VertexArray.cpp +++ b/src/CSFML/Graphics/VertexArray.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfVertexArray* sfVertexArray_create(void) +sfVertexArray* sfVertexArray_create() { return new sfVertexArray; } diff --git a/src/CSFML/Graphics/View.cpp b/src/CSFML/Graphics/View.cpp index 3cc0f6a9..22aa96b2 100644 --- a/src/CSFML/Graphics/View.cpp +++ b/src/CSFML/Graphics/View.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfView* sfView_create(void) +sfView* sfView_create() { return new sfView; } diff --git a/src/CSFML/Network/Ftp.cpp b/src/CSFML/Network/Ftp.cpp index 6f1c9e68..ff416f36 100644 --- a/src/CSFML/Network/Ftp.cpp +++ b/src/CSFML/Network/Ftp.cpp @@ -167,7 +167,7 @@ const char* sfFtpResponse_getMessage(const sfFtpResponse* ftpResponse) //////////////////////////////////////////////////////////// -sfFtp* sfFtp_create(void) +sfFtp* sfFtp_create() { return new sfFtp; } diff --git a/src/CSFML/Network/Http.cpp b/src/CSFML/Network/Http.cpp index 5fd30d2b..c7b5e054 100644 --- a/src/CSFML/Network/Http.cpp +++ b/src/CSFML/Network/Http.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfHttpRequest* sfHttpRequest_create(void) +sfHttpRequest* sfHttpRequest_create() { return new sfHttpRequest; } @@ -132,7 +132,7 @@ const char* sfHttpResponse_getBody(const sfHttpResponse* httpResponse) //////////////////////////////////////////////////////////// -sfHttp* sfHttp_create(void) +sfHttp* sfHttp_create() { return new sfHttp; } diff --git a/src/CSFML/Network/IpAddress.cpp b/src/CSFML/Network/IpAddress.cpp index bf1da87e..67ba7231 100644 --- a/src/CSFML/Network/IpAddress.cpp +++ b/src/CSFML/Network/IpAddress.cpp @@ -107,7 +107,7 @@ uint32_t sfIpAddress_toInteger(sfIpAddress address) //////////////////////////////////////////////////////////// -sfIpAddress sfIpAddress_getLocalAddress(void) +sfIpAddress sfIpAddress_getLocalAddress() { return fromSFMLAddress(sf::IpAddress::getLocalAddress()); } diff --git a/src/CSFML/Network/Packet.cpp b/src/CSFML/Network/Packet.cpp index 9bbe811b..9d1f8310 100644 --- a/src/CSFML/Network/Packet.cpp +++ b/src/CSFML/Network/Packet.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfPacket* sfPacket_create(void) +sfPacket* sfPacket_create() { return new sfPacket; } diff --git a/src/CSFML/Network/SocketSelector.cpp b/src/CSFML/Network/SocketSelector.cpp index 98f7a121..ee1e4878 100644 --- a/src/CSFML/Network/SocketSelector.cpp +++ b/src/CSFML/Network/SocketSelector.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////// -sfSocketSelector* sfSocketSelector_create(void) +sfSocketSelector* sfSocketSelector_create() { return new sfSocketSelector; } diff --git a/src/CSFML/Network/TcpListener.cpp b/src/CSFML/Network/TcpListener.cpp index c84dacb8..72fe7fff 100644 --- a/src/CSFML/Network/TcpListener.cpp +++ b/src/CSFML/Network/TcpListener.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////// -sfTcpListener* sfTcpListener_create(void) +sfTcpListener* sfTcpListener_create() { return new sfTcpListener; } diff --git a/src/CSFML/Network/TcpSocket.cpp b/src/CSFML/Network/TcpSocket.cpp index b9844c95..7448612f 100644 --- a/src/CSFML/Network/TcpSocket.cpp +++ b/src/CSFML/Network/TcpSocket.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////// -sfTcpSocket* sfTcpSocket_create(void) +sfTcpSocket* sfTcpSocket_create() { return new sfTcpSocket; } diff --git a/src/CSFML/Network/UdpSocket.cpp b/src/CSFML/Network/UdpSocket.cpp index 7a036caf..a37974fc 100644 --- a/src/CSFML/Network/UdpSocket.cpp +++ b/src/CSFML/Network/UdpSocket.cpp @@ -34,7 +34,7 @@ //////////////////////////////////////////////////////////// -sfUdpSocket* sfUdpSocket_create(void) +sfUdpSocket* sfUdpSocket_create() { return new sfUdpSocket; } diff --git a/src/CSFML/System/Buffer.cpp b/src/CSFML/System/Buffer.cpp index d6a62182..b594724b 100644 --- a/src/CSFML/System/Buffer.cpp +++ b/src/CSFML/System/Buffer.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfBuffer* sfBuffer_create(void) +sfBuffer* sfBuffer_create() { return new sfBuffer; } diff --git a/src/CSFML/System/Clock.cpp b/src/CSFML/System/Clock.cpp index 9cebaef3..5476065d 100644 --- a/src/CSFML/System/Clock.cpp +++ b/src/CSFML/System/Clock.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////// -sfClock* sfClock_create(void) +sfClock* sfClock_create() { return new sfClock; } diff --git a/src/CSFML/Window/Context.cpp b/src/CSFML/Window/Context.cpp index c5f0843c..fdcde7aa 100644 --- a/src/CSFML/Window/Context.cpp +++ b/src/CSFML/Window/Context.cpp @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////// -sfContext* sfContext_create(void) +sfContext* sfContext_create() { return new sfContext; } diff --git a/src/CSFML/Window/Joystick.cpp b/src/CSFML/Window/Joystick.cpp index 1c3dccaa..27bd9bc8 100644 --- a/src/CSFML/Window/Joystick.cpp +++ b/src/CSFML/Window/Joystick.cpp @@ -82,7 +82,7 @@ sfJoystickIdentification sfJoystick_getIdentification(unsigned int joystick) } //////////////////////////////////////////////////////////// -void sfJoystick_update(void) +void sfJoystick_update() { sf::Joystick::update(); } diff --git a/src/CSFML/Window/VideoMode.cpp b/src/CSFML/Window/VideoMode.cpp index 747e1896..84d9c66f 100644 --- a/src/CSFML/Window/VideoMode.cpp +++ b/src/CSFML/Window/VideoMode.cpp @@ -31,7 +31,7 @@ //////////////////////////////////////////////////////////// -sfVideoMode sfVideoMode_getDesktopMode(void) +sfVideoMode sfVideoMode_getDesktopMode() { sf::VideoMode desktop = sf::VideoMode::getDesktopMode(); sfVideoMode ret;