diff --git a/examples/event_handling/EventHandling.cpp b/examples/event_handling/EventHandling.cpp index d033e38d7b..368d184f06 100644 --- a/examples/event_handling/EventHandling.cpp +++ b/examples/event_handling/EventHandling.cpp @@ -316,10 +316,10 @@ class Application // Member data //////////////////////////////////////////////////////////// sf::RenderWindow m_window{sf::VideoMode({800u, 600u}), "SFML Event Handling", sf::Style::Titlebar | sf::Style::Close}; - const sf::Font m_font{"resources/tuffy.ttf"}; - sf::Text m_logText{m_font, "", 20}; - sf::Text m_handlerText{m_font, "Current Handler: Classic", 24}; - sf::Text m_instructions{m_font, "Press Enter to change handler type", 24}; + const sf::Font m_font{"resources/tuffy.ttf"}; + sf::Text m_logText{m_font, "", 20}; + sf::Text m_handlerText{m_font, "Current Handler: Classic", 24}; + sf::Text m_instructions{m_font, "Press Enter to change handler type", 24}; std::vector m_log; HandlerType m_handlerType{HandlerType::Classic}; }; diff --git a/include/SFML/Audio/InputSoundFile.hpp b/include/SFML/Audio/InputSoundFile.hpp index 206b0a3e12..526f8d943c 100644 --- a/include/SFML/Audio/InputSoundFile.hpp +++ b/include/SFML/Audio/InputSoundFile.hpp @@ -285,12 +285,12 @@ class SFML_AUDIO_API InputSoundFile //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - std::unique_ptr m_reader; //!< Reader that handles I/O on the file's format + std::unique_ptr m_reader; //!< Reader that handles I/O on the file's format std::unique_ptr m_stream{nullptr, false}; //!< Input stream used to access the file's data - std::uint64_t m_sampleOffset{}; //!< Sample Read Position - std::uint64_t m_sampleCount{}; //!< Total number of samples in the file - unsigned int m_sampleRate{}; //!< Number of samples per second - std::vector m_channelMap; //!< The map of position in sample frame to sound channel + std::uint64_t m_sampleOffset{}; //!< Sample Read Position + std::uint64_t m_sampleCount{}; //!< Total number of samples in the file + unsigned int m_sampleRate{}; //!< Number of samples per second + std::vector m_channelMap; //!< The map of position in sample frame to sound channel }; } // namespace sf diff --git a/include/SFML/Audio/SoundBuffer.hpp b/include/SFML/Audio/SoundBuffer.hpp index f85fe763d9..215abfd27e 100644 --- a/include/SFML/Audio/SoundBuffer.hpp +++ b/include/SFML/Audio/SoundBuffer.hpp @@ -365,8 +365,8 @@ class SFML_AUDIO_API SoundBuffer std::vector m_samples; //!< Samples buffer unsigned int m_sampleRate{44100}; //!< Number of samples per second std::vector m_channelMap{SoundChannel::Mono}; //!< The map of position in sample frame to sound channel - Time m_duration; //!< Sound duration - mutable SoundList m_sounds; //!< List of sounds that are using this buffer + Time m_duration; //!< Sound duration + mutable SoundList m_sounds; //!< List of sounds that are using this buffer }; } // namespace sf diff --git a/include/SFML/Graphics/StencilMode.hpp b/include/SFML/Graphics/StencilMode.hpp index 9672f02d3a..871c545c2c 100644 --- a/include/SFML/Graphics/StencilMode.hpp +++ b/include/SFML/Graphics/StencilMode.hpp @@ -110,7 +110,7 @@ struct SFML_GRAPHICS_API StencilMode StencilUpdateOperation::Keep}; //!< The update operation to perform if the stencil test passes StencilValue stencilReference{0}; //!< The reference value we're performing the stencil test with StencilValue stencilMask{~0u}; //!< The mask to apply to both the reference value and the value in the stencil buffer - bool stencilOnly{}; //!< Whether we should update the color buffer in addition to the stencil buffer + bool stencilOnly{}; //!< Whether we should update the color buffer in addition to the stencil buffer }; //////////////////////////////////////////////////////////// diff --git a/include/SFML/Network/Http.hpp b/include/SFML/Network/Http.hpp index a911de4754..6a3751135b 100644 --- a/include/SFML/Network/Http.hpp +++ b/include/SFML/Network/Http.hpp @@ -214,10 +214,10 @@ class SFML_NETWORK_API Http NotModified = 304, //!< For conditional requests, means the requested page hasn't changed and doesn't need to be refreshed // 4xx: client error - BadRequest = 400, //!< The server couldn't understand the request (syntax error) - Unauthorized = 401, //!< The requested page needs an authentication to be accessed - Forbidden = 403, //!< The requested page cannot be accessed at all, even with authentication - NotFound = 404, //!< The requested page doesn't exist + BadRequest = 400, //!< The server couldn't understand the request (syntax error) + Unauthorized = 401, //!< The requested page needs an authentication to be accessed + Forbidden = 403, //!< The requested page cannot be accessed at all, even with authentication + NotFound = 404, //!< The requested page doesn't exist RangeNotSatisfiable = 407, //!< The server can't satisfy the partial GET request (with a "Range" header field) // 5xx: server error diff --git a/include/SFML/Window/Event.hpp b/include/SFML/Window/Event.hpp index 94052982d2..7e7da76376 100644 --- a/include/SFML/Window/Event.hpp +++ b/include/SFML/Window/Event.hpp @@ -123,8 +123,8 @@ class Event struct MouseWheelScrolled { Mouse::Wheel wheel{}; //!< Which wheel (for mice with multiple ones) - float delta{}; //!< Wheel offset (positive is up/left, negative is down/right). High-precision mice may use non-integral offsets. - Vector2i position; //!< Position of the mouse pointer, relative to the top left of the owner window + float delta{}; //!< Wheel offset (positive is up/left, negative is down/right). High-precision mice may use non-integral offsets. + Vector2i position; //!< Position of the mouse pointer, relative to the top left of the owner window }; //////////////////////////////////////////////////////////// diff --git a/src/SFML/Audio/MiniaudioUtils.cpp b/src/SFML/Audio/MiniaudioUtils.cpp index 5f98889dd6..6a8a6d69bd 100644 --- a/src/SFML/Audio/MiniaudioUtils.cpp +++ b/src/SFML/Audio/MiniaudioUtils.cpp @@ -121,10 +121,8 @@ MiniaudioUtils::SoundBase::SoundBase(const ma_data_source_vtable& dataSource if (const ma_result result = ma_data_source_init(&config, &dataSourceBase); result != MA_SUCCESS) err() << "Failed to initialize audio data source: " << ma_result_description(result) << std::endl; - resourceEntryIter = AudioDevice::registerResource( - this, - [](void* ptr) { static_cast(ptr)->deinitialize(); }, - reinitializeFunc); + resourceEntryIter = AudioDevice:: + registerResource(this, [](void* ptr) { static_cast(ptr)->deinitialize(); }, reinitializeFunc); } diff --git a/src/SFML/Audio/MiniaudioUtils.hpp b/src/SFML/Audio/MiniaudioUtils.hpp index 8157954482..706b6b23ff 100644 --- a/src/SFML/Audio/MiniaudioUtils.hpp +++ b/src/SFML/Audio/MiniaudioUtils.hpp @@ -92,12 +92,12 @@ struct SoundBase }; ma_data_source_base dataSourceBase{}; //!< The struct that makes this object a miniaudio data source (must be first member) - ma_node_vtable effectNodeVTable{}; //!< Vtable of the effect node - EffectNode effectNode; //!< The engine node that performs effect processing + ma_node_vtable effectNodeVTable{}; //!< Vtable of the effect node + EffectNode effectNode; //!< The engine node that performs effect processing std::vector soundChannelMap; //!< The map of position in sample frame to sound channel (miniaudio channels) - ma_sound sound{}; //!< The sound - SoundSource::Status status{SoundSource::Status::Stopped}; //!< The status - SoundSource::EffectProcessor effectProcessor; //!< The effect processor + ma_sound sound{}; //!< The sound + SoundSource::Status status{SoundSource::Status::Stopped}; //!< The status + SoundSource::EffectProcessor effectProcessor; //!< The effect processor AudioDevice::ResourceEntryIter resourceEntryIter; //!< Iterator to the resource entry registered with the AudioDevice MiniaudioUtils::SavedSettings savedSettings; //!< Saved settings used to restore ma_sound state in case we need to recreate it }; diff --git a/src/SFML/Audio/SoundStream.cpp b/src/SFML/Audio/SoundStream.cpp index 6480a80d64..3ed2c2809d 100644 --- a/src/SFML/Audio/SoundStream.cpp +++ b/src/SFML/Audio/SoundStream.cpp @@ -211,15 +211,15 @@ struct SoundStream::Impl : priv::MiniaudioUtils::SoundBase // Member data //////////////////////////////////////////////////////////// static constexpr ma_data_source_vtable vtable{read, seek, getFormat, getCursor, getLength, setLooping, /* flags */ 0}; - SoundStream* owner; //!< Owning SoundStream object - std::vector sampleBuffer; //!< Our temporary sample buffer - std::size_t sampleBufferCursor{}; //!< The current read position in the temporary sample buffer - std::uint64_t samplesProcessed{}; //!< Number of samples processed since beginning of the stream - unsigned int channelCount{}; //!< Number of channels (1 = mono, 2 = stereo, ...) - unsigned int sampleRate{}; //!< Frequency (samples / second) - std::vector channelMap; //!< The map of position in sample frame to sound channel - bool loop{}; //!< Loop flag (true to loop, false to play once) - bool streaming{true}; //!< True if we are still streaming samples from the source + SoundStream* owner; //!< Owning SoundStream object + std::vector sampleBuffer; //!< Our temporary sample buffer + std::size_t sampleBufferCursor{}; //!< The current read position in the temporary sample buffer + std::uint64_t samplesProcessed{}; //!< Number of samples processed since beginning of the stream + unsigned int channelCount{}; //!< Number of channels (1 = mono, 2 = stereo, ...) + unsigned int sampleRate{}; //!< Frequency (samples / second) + std::vector channelMap; //!< The map of position in sample frame to sound channel + bool loop{}; //!< Loop flag (true to loop, false to play once) + bool streaming{true}; //!< True if we are still streaming samples from the source }; diff --git a/src/SFML/Graphics/Image.cpp b/src/SFML/Graphics/Image.cpp index af6770392c..a2395f196c 100644 --- a/src/SFML/Graphics/Image.cpp +++ b/src/SFML/Graphics/Image.cpp @@ -474,7 +474,7 @@ bool Image::copy(const Image& source, Vector2u dest, const IntRect& sourceRect, const unsigned int dstStride = m_size.x * 4; const std::uint8_t* srcPixels = source.m_pixels.data() + (srcRect.position.x + srcRect.position.y * source.m_size.x) * 4; - std::uint8_t* dstPixels = m_pixels.data() + (dest.x + dest.y * m_size.x) * 4; + std::uint8_t* dstPixels = m_pixels.data() + (dest.x + dest.y * m_size.x) * 4; // Copy the pixels if (applyAlpha) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index 64b6584e22..eb240d96bb 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -890,7 +890,7 @@ void RenderTarget::drawPrimitives(PrimitiveType type, std::size_t firstVertex, s { // Find the OpenGL primitive type static constexpr GLenum modes[] = {GL_POINTS, GL_LINES, GL_LINE_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN}; - const GLenum mode = modes[static_cast(type)]; + const GLenum mode = modes[static_cast(type)]; // Draw the primitives glCheck(glDrawArrays(mode, static_cast(firstVertex), static_cast(vertexCount))); diff --git a/src/SFML/Graphics/Texture.cpp b/src/SFML/Graphics/Texture.cpp index 9fafb1dd92..572f32380d 100644 --- a/src/SFML/Graphics/Texture.cpp +++ b/src/SFML/Graphics/Texture.cpp @@ -515,10 +515,10 @@ Image Texture::copyToImage() const glCheck(glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, allPixels.data())); // Then we copy the useful pixels from the temporary array to the final one - const std::uint8_t* src = allPixels.data(); - std::uint8_t* dst = pixels.data(); - int srcPitch = static_cast(m_actualSize.x * 4); - const unsigned int dstPitch = m_size.x * 4; + const std::uint8_t* src = allPixels.data(); + std::uint8_t* dst = pixels.data(); + int srcPitch = static_cast(m_actualSize.x * 4); + const unsigned int dstPitch = m_size.x * 4; // Handle the case where source pixels are flipped vertically if (m_pixelsFlipped) diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index 91d1a6a82b..49a01c6fb9 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -171,7 +171,7 @@ void goToFullscreenMode(ANativeActivity& activity) // API Level 19 if (apiLevel >= 19) { - jfieldID fieldSystemUiFlagImmersiveSticky = lJNIEnv->GetStaticFieldID(classView, + jfieldID fieldSystemUiFlagImmersiveSticky = lJNIEnv->GetStaticFieldID(classView, "SYSTEM_UI_FLAG_IMMERSIVE_STICKY", "I"); const jint systemUiFlagImmersiveSticky = lJNIEnv->GetStaticIntField(classView, fieldSystemUiFlagImmersiveSticky); diff --git a/src/SFML/Network/Packet.cpp b/src/SFML/Network/Packet.cpp index 210a7f6b23..4d8889e95c 100644 --- a/src/SFML/Network/Packet.cpp +++ b/src/SFML/Network/Packet.cpp @@ -441,7 +441,7 @@ Packet& Packet::operator<<(std::int64_t data) static_cast((data >> 24) & 0xFF), static_cast((data >> 16) & 0xFF), static_cast((data >> 8) & 0xFF), - static_cast((data)&0xFF)}; + static_cast((data) & 0xFF)}; append(&toWrite, sizeof(toWrite)); return *this; @@ -461,7 +461,7 @@ Packet& Packet::operator<<(std::uint64_t data) static_cast((data >> 24) & 0xFF), static_cast((data >> 16) & 0xFF), static_cast((data >> 8) & 0xFF), - static_cast((data)&0xFF)}; + static_cast((data) & 0xFF)}; append(&toWrite, sizeof(toWrite)); return *this; diff --git a/src/SFML/Window/DRM/DRMContext.cpp b/src/SFML/Window/DRM/DRMContext.cpp index 071a69d5d5..94e665c214 100644 --- a/src/SFML/Window/DRM/DRMContext.cpp +++ b/src/SFML/Window/DRM/DRMContext.cpp @@ -757,33 +757,33 @@ EGLConfig DRMContext::getBestConfig(EGLDisplay display, unsigned int bitsPerPixe { // Set our video settings constraint const EGLint attributes[] = - { EGL_BUFFER_SIZE, - static_cast(bitsPerPixel), - EGL_DEPTH_SIZE, - static_cast(settings.depthBits), - EGL_STENCIL_SIZE, - static_cast(settings.stencilBits), - EGL_SAMPLE_BUFFERS, - static_cast(settings.antiAliasingLevel), - EGL_BLUE_SIZE, - 8, - EGL_GREEN_SIZE, - 8, - EGL_RED_SIZE, - 8, - EGL_ALPHA_SIZE, - 8, - - EGL_SURFACE_TYPE, - EGL_WINDOW_BIT, + {EGL_BUFFER_SIZE, + static_cast(bitsPerPixel), + EGL_DEPTH_SIZE, + static_cast(settings.depthBits), + EGL_STENCIL_SIZE, + static_cast(settings.stencilBits), + EGL_SAMPLE_BUFFERS, + static_cast(settings.antiAliasingLevel), + EGL_BLUE_SIZE, + 8, + EGL_GREEN_SIZE, + 8, + EGL_RED_SIZE, + 8, + EGL_ALPHA_SIZE, + 8, + + EGL_SURFACE_TYPE, + EGL_WINDOW_BIT, #if defined(SFML_OPENGL_ES) - EGL_RENDERABLE_TYPE, - EGL_OPENGL_ES_BIT, + EGL_RENDERABLE_TYPE, + EGL_OPENGL_ES_BIT, #else - EGL_RENDERABLE_TYPE, - EGL_OPENGL_BIT, + EGL_RENDERABLE_TYPE, + EGL_OPENGL_BIT, #endif - EGL_NONE }; + EGL_NONE}; EGLint configCount = 0; EGLConfig configs[1]; diff --git a/src/SFML/Window/DRM/InputImpl.cpp b/src/SFML/Window/DRM/InputImpl.cpp index 20dbb66449..12b182b1af 100644 --- a/src/SFML/Window/DRM/InputImpl.cpp +++ b/src/SFML/Window/DRM/InputImpl.cpp @@ -98,7 +98,7 @@ void uninitFileDescriptors() } #define BITS_PER_LONG (sizeof(unsigned long) * 8) -#define NBITS(x) ((((x)-1) / BITS_PER_LONG) + 1) +#define NBITS(x) ((((x) - 1) / BITS_PER_LONG) + 1) #define OFF(x) ((x) % BITS_PER_LONG) #define LONG(x) ((x) / BITS_PER_LONG) #define TEST_BIT(bit, array) (((array)[LONG(bit)] >> OFF(bit)) & 1) diff --git a/src/SFML/Window/EglContext.cpp b/src/SFML/Window/EglContext.cpp index e11d7ebfe2..a5be026017 100644 --- a/src/SFML/Window/EglContext.cpp +++ b/src/SFML/Window/EglContext.cpp @@ -433,7 +433,7 @@ XVisualInfo EglContext::selectBestVisual(::Display* xDisplay, unsigned int bitsP vTemplate.visualid = static_cast(nativeVisualId); // Get X11 visuals compatible with this EGL config - int visualCount = 0; + int visualCount = 0; const auto availableVisuals = X11Ptr(XGetVisualInfo(xDisplay, VisualIDMask, &vTemplate, &visualCount)); if (visualCount == 0) diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 4e4104550f..2e37a97180 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -1053,7 +1053,7 @@ void GlContext::initialize(const ContextSettings& requestedSettings) void GlContext::checkSettings(const ContextSettings& requestedSettings) const { // Perform checks to inform the user if they are getting a context they might not have expected - const int version = static_cast(m_settings.majorVersion * 10u + m_settings.minorVersion); + const int version = static_cast(m_settings.majorVersion * 10u + m_settings.minorVersion); const int requestedVersion = static_cast(requestedSettings.majorVersion * 10u + requestedSettings.minorVersion); if ((m_settings.attributeFlags != requestedSettings.attributeFlags) || (version < requestedVersion) || diff --git a/src/SFML/Window/Unix/CursorImpl.cpp b/src/SFML/Window/Unix/CursorImpl.cpp index e8cc13f2d3..da4f9cf747 100644 --- a/src/SFML/Window/Unix/CursorImpl.cpp +++ b/src/SFML/Window/Unix/CursorImpl.cpp @@ -80,8 +80,8 @@ bool CursorImpl::loadFromPixelsARGB(const std::uint8_t* pixels, Vector2u size, V { // Create cursor image, convert from RGBA to ARGB. const auto cursorImage = X11Ptr(XcursorImageCreate(static_cast(size.x), static_cast(size.y))); - cursorImage->xhot = hotspot.x; - cursorImage->yhot = hotspot.y; + cursorImage->xhot = hotspot.x; + cursorImage->yhot = hotspot.y; const std::size_t numPixels = static_cast(size.x) * static_cast(size.y); for (std::size_t pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex) diff --git a/src/SFML/Window/Unix/JoystickImpl.cpp b/src/SFML/Window/Unix/JoystickImpl.cpp index 3582f73b5b..de8b605b24 100644 --- a/src/SFML/Window/Unix/JoystickImpl.cpp +++ b/src/SFML/Window/Unix/JoystickImpl.cpp @@ -579,7 +579,7 @@ JoystickCaps JoystickImpl::getCapabilities() const { switch (m_mapping[static_cast(i)]) { - // clang-format off + // clang-format off case ABS_X: caps.axes[Joystick::Axis::X] = true; break; case ABS_Y: caps.axes[Joystick::Axis::Y] = true; break; case ABS_Z: diff --git a/src/SFML/Window/Unix/KeyboardImpl.cpp b/src/SFML/Window/Unix/KeyboardImpl.cpp index 396ed177a3..021ae0f82e 100644 --- a/src/SFML/Window/Unix/KeyboardImpl.cpp +++ b/src/SFML/Window/Unix/KeyboardImpl.cpp @@ -48,8 +48,8 @@ namespace { -const KeyCode nullKeyCode = 0; -const int maxKeyCode = 256; +const KeyCode nullKeyCode = 0; +const int maxKeyCode = 256; sf::priv::EnumArray scancodeToKeycode; ///< Mapping of SFML scancode to X11 KeyCode std::array keycodeToScancode; ///< Mapping of X11 KeyCode to SFML scancode diff --git a/src/SFML/Window/Unix/WindowImplX11.hpp b/src/SFML/Window/Unix/WindowImplX11.hpp index a4013ece23..d06c1d1456 100644 --- a/src/SFML/Window/Unix/WindowImplX11.hpp +++ b/src/SFML/Window/Unix/WindowImplX11.hpp @@ -327,15 +327,15 @@ class WindowImplX11 : public WindowImpl RRCrtc m_oldRRCrtc{}; ///< RRCrtc in use before we switch to fullscreen ::Cursor m_hiddenCursor{}; ///< As X11 doesn't provide cursor hiding, we must create a transparent one ::Cursor m_lastCursor{None}; ///< Last cursor used -- this data is not owned by the window and is required to be always valid - bool m_keyRepeat{true}; ///< Is the KeyRepeat feature enabled? + bool m_keyRepeat{true}; ///< Is the KeyRepeat feature enabled? Vector2i m_previousSize{-1, -1}; ///< Previous size of the window, to find if a ConfigureNotify event is a resize event (could be a move event only) - bool m_useSizeHints{}; ///< Is the size of the window fixed with size hints? - bool m_fullscreen{}; ///< Is the window in fullscreen? - bool m_cursorGrabbed{}; ///< Is the mouse cursor trapped? - bool m_windowMapped{}; ///< Has the window been mapped by the window manager? - Pixmap m_iconPixmap{}; ///< The current icon pixmap if in use - Pixmap m_iconMaskPixmap{}; ///< The current icon mask pixmap if in use - ::Time m_lastInputTime{}; ///< Last time we received user input + bool m_useSizeHints{}; ///< Is the size of the window fixed with size hints? + bool m_fullscreen{}; ///< Is the window in fullscreen? + bool m_cursorGrabbed{}; ///< Is the mouse cursor trapped? + bool m_windowMapped{}; ///< Has the window been mapped by the window manager? + Pixmap m_iconPixmap{}; ///< The current icon pixmap if in use + Pixmap m_iconMaskPixmap{}; ///< The current icon mask pixmap if in use + ::Time m_lastInputTime{}; ///< Last time we received user input }; } // namespace sf::priv diff --git a/src/SFML/Window/Win32/JoystickImpl.hpp b/src/SFML/Window/Win32/JoystickImpl.hpp index 57d7e509f8..07831c0459 100644 --- a/src/SFML/Window/Win32/JoystickImpl.hpp +++ b/src/SFML/Window/Win32/JoystickImpl.hpp @@ -213,10 +213,10 @@ class JoystickImpl //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - unsigned int m_index{}; //!< Index of the joystick - JOYCAPS m_caps{}; //!< Joystick capabilities - IDirectInputDevice8W* m_device{}; //!< DirectInput 8.x device - DIDEVCAPS m_deviceCaps{}; //!< DirectInput device capabilities + unsigned int m_index{}; //!< Index of the joystick + JOYCAPS m_caps{}; //!< Joystick capabilities + IDirectInputDevice8W* m_device{}; //!< DirectInput 8.x device + DIDEVCAPS m_deviceCaps{}; //!< DirectInput device capabilities EnumArray m_axes{}; //!< Offsets to the bytes containing the axes states, -1 if not available int m_buttons[Joystick::ButtonCount]{}; //!< Offsets to the bytes containing the button states, -1 if not available Joystick::Identification m_identification; //!< Joystick identification diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index d03896ac6b..d766750b99 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -305,9 +305,9 @@ class WindowImplWin32 : public WindowImpl Vector2u m_lastSize; //!< The last handled size of the window bool m_resizing{}; //!< Is the window being resized? std::uint16_t m_surrogate{}; //!< First half of the surrogate pair, in case we're receiving a Unicode character in two events - bool m_mouseInside{}; //!< Mouse is inside the window? - bool m_fullscreen{}; //!< Is the window fullscreen? - bool m_cursorGrabbed{}; //!< Is the mouse cursor trapped? + bool m_mouseInside{}; //!< Mouse is inside the window? + bool m_fullscreen{}; //!< Is the window fullscreen? + bool m_cursorGrabbed{}; //!< Is the mouse cursor trapped? }; } // namespace priv diff --git a/src/SFML/Window/iOS/EaglContext.mm b/src/SFML/Window/iOS/EaglContext.mm index 52a6a3d965..1d3e98e65a 100644 --- a/src/SFML/Window/iOS/EaglContext.mm +++ b/src/SFML/Window/iOS/EaglContext.mm @@ -86,7 +86,7 @@ void ensureInit() sf::priv::EaglContext::getFunction("glRenderbufferStorageOES")); } } -} +} // namespace namespace sf::priv diff --git a/src/SFML/Window/iOS/InputImpl.mm b/src/SFML/Window/iOS/InputImpl.mm index 59a09dc2cc..a7337f752c 100644 --- a/src/SFML/Window/iOS/InputImpl.mm +++ b/src/SFML/Window/iOS/InputImpl.mm @@ -138,4 +138,4 @@ Vector2i getTouchPosition(unsigned int finger, const WindowBase& /* relativeTo * return getTouchPosition(finger); } -} // namespace sf::priv +} // namespace sf::priv::InputImpl diff --git a/src/SFML/Window/iOS/SFAppDelegate.mm b/src/SFML/Window/iOS/SFAppDelegate.mm index f234040b86..5ee3206d4c 100644 --- a/src/SFML/Window/iOS/SFAppDelegate.mm +++ b/src/SFML/Window/iOS/SFAppDelegate.mm @@ -38,7 +38,7 @@ // Current touches positions std::vector touchPositions; -} +} // namespace @interface SFAppDelegate () diff --git a/src/SFML/Window/macOS/CursorImpl.mm b/src/SFML/Window/macOS/CursorImpl.mm index 5b4ea41127..d86caebc76 100644 --- a/src/SFML/Window/macOS/CursorImpl.mm +++ b/src/SFML/Window/macOS/CursorImpl.mm @@ -45,7 +45,7 @@ return nil; } -} +} // namespace namespace sf::priv { diff --git a/src/SFML/Window/macOS/HIDInputManager.mm b/src/SFML/Window/macOS/HIDInputManager.mm index 829901f556..5f19c80ee8 100644 --- a/src/SFML/Window/macOS/HIDInputManager.mm +++ b/src/SFML/Window/macOS/HIDInputManager.mm @@ -37,7 +37,7 @@ { const std::uint8_t unknownVirtualCode = 0xff; const bool isIsoKeyboard = (KBGetLayoutType(LMGetKbdType()) == kKeyboardISO); -} +} // namespace namespace sf::priv { diff --git a/src/SFML/Window/macOS/InputImpl.mm b/src/SFML/Window/macOS/InputImpl.mm index 1ab7396739..633553afa3 100644 --- a/src/SFML/Window/macOS/InputImpl.mm +++ b/src/SFML/Window/macOS/InputImpl.mm @@ -115,7 +115,7 @@ return view; } -} +} // namespace namespace sf::priv::InputImpl { @@ -263,4 +263,4 @@ Vector2i getTouchPosition(unsigned int /*finger*/, const WindowBase& /*relativeT return {}; } -} // namespace sf::priv +} // namespace sf::priv::InputImpl diff --git a/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm b/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm index f44d72232d..8589947a7f 100644 --- a/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm +++ b/src/SFML/Window/macOS/SFKeyboardModifiersHelper.mm @@ -131,7 +131,7 @@ void processLeftRightModifiers( processOneModifier(modifiers, leftMask, leftWasDown, leftKey, leftCode, requester); processOneModifier(modifiers, rightMask, rightWasDown, rightKey, rightCode, requester); } -} +} // namespace //////////////////////////////////////////////////////// diff --git a/src/SFML/Window/macOS/WindowImplCocoa.mm b/src/SFML/Window/macOS/WindowImplCocoa.mm index c7d66b124f..0e25aafa36 100644 --- a/src/SFML/Window/macOS/WindowImplCocoa.mm +++ b/src/SFML/Window/macOS/WindowImplCocoa.mm @@ -93,7 +93,7 @@ void showMouseCursor() isCursorHidden = false; } } -} +} // namespace #pragma mark #pragma mark WindowImplCocoa's ctor/dtor