From c919ad533d89f14b7602400b762c1f76631d34a2 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sun, 14 Jan 2024 13:07:53 -0700 Subject: [PATCH] Remove unnecessary `return` statements A new check in clang-tidy-18 catches this. I built it from source and ran it locally to find this. --- src/SFML/Window/Clipboard.cpp | 2 +- src/SFML/Window/Joystick.cpp | 2 +- src/SFML/Window/Sensor.cpp | 2 +- src/SFML/Window/macOS/SFViewController.mm | 2 +- src/SFML/Window/macOS/SFWindowController.mm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SFML/Window/Clipboard.cpp b/src/SFML/Window/Clipboard.cpp index c1be12189..4b05a3ea8 100644 --- a/src/SFML/Window/Clipboard.cpp +++ b/src/SFML/Window/Clipboard.cpp @@ -43,7 +43,7 @@ String Clipboard::getString() //////////////////////////////////////////////////////////// void Clipboard::setString(const String& text) { - return priv::ClipboardImpl::setString(text); + priv::ClipboardImpl::setString(text); } } // namespace sf diff --git a/src/SFML/Window/Joystick.cpp b/src/SFML/Window/Joystick.cpp index 9989e3e8a..acc0c98a2 100644 --- a/src/SFML/Window/Joystick.cpp +++ b/src/SFML/Window/Joystick.cpp @@ -79,7 +79,7 @@ Joystick::Identification Joystick::getIdentification(unsigned int joystick) //////////////////////////////////////////////////////////// void Joystick::update() { - return priv::JoystickManager::getInstance().update(); + priv::JoystickManager::getInstance().update(); } } // namespace sf diff --git a/src/SFML/Window/Sensor.cpp b/src/SFML/Window/Sensor.cpp index 17ef9c50a..b0182e4c8 100644 --- a/src/SFML/Window/Sensor.cpp +++ b/src/SFML/Window/Sensor.cpp @@ -41,7 +41,7 @@ bool Sensor::isAvailable(Type sensor) //////////////////////////////////////////////////////////// void Sensor::setEnabled(Type sensor, bool enabled) { - return priv::SensorManager::getInstance().setEnabled(sensor, enabled); + priv::SensorManager::getInstance().setEnabled(sensor, enabled); } //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/macOS/SFViewController.mm b/src/SFML/Window/macOS/SFViewController.mm index 34fd964ca..cc05538e3 100644 --- a/src/SFML/Window/macOS/SFViewController.mm +++ b/src/SFML/Window/macOS/SFViewController.mm @@ -134,7 +134,7 @@ //////////////////////////////////////////////////////// - (void)setCursor:(NSCursor*)cursor { - return [m_oglView setCursor:cursor]; + [m_oglView setCursor:cursor]; } diff --git a/src/SFML/Window/macOS/SFWindowController.mm b/src/SFML/Window/macOS/SFWindowController.mm index c497ec773..2957ec0fe 100644 --- a/src/SFML/Window/macOS/SFWindowController.mm +++ b/src/SFML/Window/macOS/SFWindowController.mm @@ -375,7 +375,7 @@ //////////////////////////////////////////////////////// - (void)setCursor:(NSCursor*)cursor { - return [m_oglView setCursor:cursor]; + [m_oglView setCursor:cursor]; }