diff --git a/.clang-tidy b/.clang-tidy index c31544c03..fb9c80883 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,6 +1,7 @@ Checks: > -*, clang-analyzer-*, + modernize-concat-nested-namespaces, readability-identifier-naming, -clang-analyzer-core.NonNullParamChecker, -clang-analyzer-core.NullDereference, diff --git a/include/SFML/Window/WindowStyle.hpp b/include/SFML/Window/WindowStyle.hpp index ff935efcc..d4b932e8b 100644 --- a/include/SFML/Window/WindowStyle.hpp +++ b/include/SFML/Window/WindowStyle.hpp @@ -25,9 +25,7 @@ #pragma once -namespace sf -{ -namespace Style +namespace sf::Style { //////////////////////////////////////////////////////////// /// \ingroup window @@ -44,6 +42,4 @@ enum Default = Titlebar | Resize | Close //!< Default window style }; -} // namespace Style - -} // namespace sf +} // namespace sf::Style diff --git a/src/SFML/Audio/ALCheck.cpp b/src/SFML/Audio/ALCheck.cpp index 476b3e659..5a5607bc1 100644 --- a/src/SFML/Audio/ALCheck.cpp +++ b/src/SFML/Audio/ALCheck.cpp @@ -45,9 +45,7 @@ thread_local ALenum lastError(AL_NO_ERROR); } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void alCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) @@ -115,6 +113,4 @@ ALenum alGetLastErrorImpl() return std::exchange(AlCheckImpl::lastError, AL_NO_ERROR); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/ALCheck.hpp b/src/SFML/Audio/ALCheck.hpp index 5e0f5d0b1..9309d64b5 100644 --- a/src/SFML/Audio/ALCheck.hpp +++ b/src/SFML/Audio/ALCheck.hpp @@ -39,9 +39,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// Let's define a macro to quickly check every OpenAL API call @@ -86,9 +84,7 @@ void alCheckError(const std::filesystem::path& file, unsigned int line, const ch //////////////////////////////////////////////////////////// ALenum alGetLastErrorImpl(); -} // namespace priv - -} // namespace sf +} // namespace sf::priv #if defined(__APPLE__) diff --git a/src/SFML/Audio/AudioDevice.cpp b/src/SFML/Audio/AudioDevice.cpp index 71da541f4..153123d0f 100644 --- a/src/SFML/Audio/AudioDevice.cpp +++ b/src/SFML/Audio/AudioDevice.cpp @@ -48,9 +48,7 @@ sf::Vector3f listenerDirection(0.f, 0.f, -1.f); sf::Vector3f listenerUpVector(0.f, 1.f, 0.f); } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// AudioDevice::AudioDevice() @@ -233,6 +231,4 @@ Vector3f AudioDevice::getUpVector() return listenerUpVector; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/AudioDevice.hpp b/src/SFML/Audio/AudioDevice.hpp index df9d3d3d7..8a57d8f2e 100644 --- a/src/SFML/Audio/AudioDevice.hpp +++ b/src/SFML/Audio/AudioDevice.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief High-level wrapper around the audio API, it manages @@ -182,6 +180,4 @@ public: static Vector3f getUpVector(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderFlac.cpp b/src/SFML/Audio/SoundFileReaderFlac.cpp index 4a137171b..2da05a861 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.cpp +++ b/src/SFML/Audio/SoundFileReaderFlac.cpp @@ -180,9 +180,7 @@ void streamError(const FLAC__StreamDecoder*, FLAC__StreamDecoderErrorStatus, voi } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileReaderFlac::check(InputStream& stream) @@ -358,6 +356,4 @@ void SoundFileReaderFlac::close() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderFlac.hpp b/src/SFML/Audio/SoundFileReaderFlac.hpp index f3bbf7ddc..76cb32d35 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.hpp +++ b/src/SFML/Audio/SoundFileReaderFlac.hpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file reader that handles FLAC files @@ -131,6 +129,4 @@ private: ClientData m_clientData; //!< Structure passed to the decoder callbacks }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderMp3.cpp b/src/SFML/Audio/SoundFileReaderMp3.cpp index ef8ce157b..f67e2b75d 100644 --- a/src/SFML/Audio/SoundFileReaderMp3.cpp +++ b/src/SFML/Audio/SoundFileReaderMp3.cpp @@ -74,9 +74,7 @@ bool hasValidId3Tag(const std::uint8_t* header) } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileReaderMp3::check(InputStream& stream) @@ -150,6 +148,4 @@ std::uint64_t SoundFileReaderMp3::read(std::int16_t* samples, std::uint64_t maxC return toRead; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderMp3.hpp b/src/SFML/Audio/SoundFileReaderMp3.hpp index 8f475e9a2..3d19a36b4 100644 --- a/src/SFML/Audio/SoundFileReaderMp3.hpp +++ b/src/SFML/Audio/SoundFileReaderMp3.hpp @@ -51,9 +51,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file reader that handles MP3 files @@ -132,6 +130,4 @@ private: std::uint64_t m_position{}; // Position in decompressed audio buffer }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderOgg.cpp b/src/SFML/Audio/SoundFileReaderOgg.cpp index cc7753933..08f45a8fa 100644 --- a/src/SFML/Audio/SoundFileReaderOgg.cpp +++ b/src/SFML/Audio/SoundFileReaderOgg.cpp @@ -67,9 +67,7 @@ long tell(void* data) static ov_callbacks callbacks = {&read, &seek, nullptr, &tell}; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileReaderOgg::check(InputStream& stream) @@ -173,6 +171,4 @@ void SoundFileReaderOgg::close() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderOgg.hpp b/src/SFML/Audio/SoundFileReaderOgg.hpp index a14e068d4..e382c62a5 100644 --- a/src/SFML/Audio/SoundFileReaderOgg.hpp +++ b/src/SFML/Audio/SoundFileReaderOgg.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file reader that handles OGG/Vorbis files @@ -117,6 +115,4 @@ private: unsigned int m_channelCount{}; // number of channels of the open sound file }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderWav.cpp b/src/SFML/Audio/SoundFileReaderWav.cpp index c44fbd630..7c20fec62 100644 --- a/src/SFML/Audio/SoundFileReaderWav.cpp +++ b/src/SFML/Audio/SoundFileReaderWav.cpp @@ -101,9 +101,7 @@ const char* waveSubformatPcm = "\x80\x00\x00\xAA\x00\x38\x9B\x71"; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileReaderWav::check(InputStream& stream) @@ -355,6 +353,4 @@ bool SoundFileReaderWav::parseHeader(Info& info) return true; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileReaderWav.hpp b/src/SFML/Audio/SoundFileReaderWav.hpp index bc82af2bc..507142979 100644 --- a/src/SFML/Audio/SoundFileReaderWav.hpp +++ b/src/SFML/Audio/SoundFileReaderWav.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file reader that handles wav files @@ -113,6 +111,4 @@ private: std::uint64_t m_dataEnd{}; //!< Position one byte past the end of the audio data in the open file }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterFlac.cpp b/src/SFML/Audio/SoundFileWriterFlac.cpp index fc0358753..f404576b9 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.cpp +++ b/src/SFML/Audio/SoundFileWriterFlac.cpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileWriterFlac::check(const std::filesystem::path& filename) @@ -125,6 +123,4 @@ void SoundFileWriterFlac::close() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterFlac.hpp b/src/SFML/Audio/SoundFileWriterFlac.hpp index f726e1b6f..2bc080d22 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.hpp +++ b/src/SFML/Audio/SoundFileWriterFlac.hpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file writer that handles FLAC files @@ -104,6 +102,4 @@ private: std::vector m_samples32; //!< Conversion buffer }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterOgg.cpp b/src/SFML/Audio/SoundFileWriterOgg.cpp index 4a51895ea..5e3aabd37 100644 --- a/src/SFML/Audio/SoundFileWriterOgg.cpp +++ b/src/SFML/Audio/SoundFileWriterOgg.cpp @@ -36,9 +36,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileWriterOgg::check(const std::filesystem::path& filename) @@ -206,6 +204,4 @@ void SoundFileWriterOgg::close() vorbis_info_clear(&m_vorbis); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterOgg.hpp b/src/SFML/Audio/SoundFileWriterOgg.hpp index 4ac50242f..d79334565 100644 --- a/src/SFML/Audio/SoundFileWriterOgg.hpp +++ b/src/SFML/Audio/SoundFileWriterOgg.hpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file writer that handles OGG/Vorbis files @@ -113,6 +111,4 @@ private: vorbis_dsp_state m_state{}; // current encoding state }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterWav.cpp b/src/SFML/Audio/SoundFileWriterWav.cpp index 223ce13f3..8fcac163a 100644 --- a/src/SFML/Audio/SoundFileWriterWav.cpp +++ b/src/SFML/Audio/SoundFileWriterWav.cpp @@ -62,9 +62,7 @@ void encode(std::ostream& stream, std::uint32_t value) } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool SoundFileWriterWav::check(const std::filesystem::path& filename) @@ -179,6 +177,4 @@ void SoundFileWriterWav::close() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Audio/SoundFileWriterWav.hpp b/src/SFML/Audio/SoundFileWriterWav.hpp index 3989d8c5c..4ccef8239 100644 --- a/src/SFML/Audio/SoundFileWriterWav.hpp +++ b/src/SFML/Audio/SoundFileWriterWav.hpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Implementation of sound file writer that handles wav files @@ -112,6 +110,4 @@ private: std::ofstream m_file; //!< File stream to write to }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/GLCheck.cpp b/src/SFML/Graphics/GLCheck.cpp index 364f8eb0f..0b5d501ef 100644 --- a/src/SFML/Graphics/GLCheck.cpp +++ b/src/SFML/Graphics/GLCheck.cpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void glCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) @@ -108,6 +106,4 @@ void glCheckError(const std::filesystem::path& file, unsigned int line, const ch } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/GLCheck.hpp b/src/SFML/Graphics/GLCheck.hpp index 0da7f0f2f..00d977072 100644 --- a/src/SFML/Graphics/GLCheck.hpp +++ b/src/SFML/Graphics/GLCheck.hpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// Let's define a macro to quickly check every OpenGL API call @@ -69,6 +67,4 @@ namespace priv //////////////////////////////////////////////////////////// void glCheckError(const std::filesystem::path& file, unsigned int line, const char* expression); -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/GLExtensions.cpp b/src/SFML/Graphics/GLExtensions.cpp index 3ffb6156c..eaed9c9d6 100644 --- a/src/SFML/Graphics/GLExtensions.cpp +++ b/src/SFML/Graphics/GLExtensions.cpp @@ -48,9 +48,7 @@ #endif -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void ensureExtensionsInit() @@ -100,6 +98,4 @@ void ensureExtensionsInit() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/GLExtensions.hpp b/src/SFML/Graphics/GLExtensions.hpp index ce5e4ad85..3064454c8 100644 --- a/src/SFML/Graphics/GLExtensions.hpp +++ b/src/SFML/Graphics/GLExtensions.hpp @@ -334,9 +334,7 @@ #define GLEXT_GL_VERSION_4_5 SF_GLAD_GL_VERSION_4_5 #define GLEXT_GL_VERSION_4_6 SF_GLAD_GL_VERSION_4_6 -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -345,6 +343,4 @@ namespace priv //////////////////////////////////////////////////////////// void ensureExtensionsInit(); -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/Glsl.cpp b/src/SFML/Graphics/Glsl.cpp index d81e2052d..1c272f53e 100644 --- a/src/SFML/Graphics/Glsl.cpp +++ b/src/SFML/Graphics/Glsl.cpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -89,5 +87,4 @@ void copyVector(const Color& source, Vector4& dest) dest.w = static_cast(source.a); } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/ImageLoader.cpp b/src/SFML/Graphics/ImageLoader.cpp index a29eec8e8..b2324bab4 100644 --- a/src/SFML/Graphics/ImageLoader.cpp +++ b/src/SFML/Graphics/ImageLoader.cpp @@ -71,9 +71,7 @@ void bufferFromCallback(void* context, void* data, int size) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// ImageLoader& ImageLoader::getInstance() @@ -320,6 +318,4 @@ bool ImageLoader::saveImageToMemory(const std::string& format, return false; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/RenderTextureImplDefault.cpp b/src/SFML/Graphics/RenderTextureImplDefault.cpp index bccba2131..1d40a8f29 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.cpp +++ b/src/SFML/Graphics/RenderTextureImplDefault.cpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// RenderTextureImplDefault::RenderTextureImplDefault() = default; @@ -95,6 +93,4 @@ void RenderTextureImplDefault::updateTexture(unsigned int textureId) glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, static_cast(m_size.x), static_cast(m_size.y))); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/RenderTextureImplFBO.cpp b/src/SFML/Graphics/RenderTextureImplFBO.cpp index 3bdc756f9..ace801eb2 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.cpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.cpp @@ -112,9 +112,7 @@ void contextDestroyCallback(void* /*arg*/) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// RenderTextureImplFBO::RenderTextureImplFBO() @@ -652,6 +650,4 @@ void RenderTextureImplFBO::updateTexture(unsigned int) #endif // SFML_OPENGL_ES } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/TextureSaver.cpp b/src/SFML/Graphics/TextureSaver.cpp index 0c8a59ccb..d2e287d5c 100644 --- a/src/SFML/Graphics/TextureSaver.cpp +++ b/src/SFML/Graphics/TextureSaver.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// TextureSaver::TextureSaver() @@ -45,6 +43,4 @@ TextureSaver::~TextureSaver() glCheck(glBindTexture(GL_TEXTURE_2D, static_cast(m_textureBinding))); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Graphics/TextureSaver.hpp b/src/SFML/Graphics/TextureSaver.hpp index 55b61a500..4ba4e26ab 100644 --- a/src/SFML/Graphics/TextureSaver.hpp +++ b/src/SFML/Graphics/TextureSaver.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Automatic wrapper for saving and restoring the current texture binding @@ -64,6 +62,4 @@ private: GLint m_textureBinding; //!< Texture binding to restore }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Main/MainAndroid.cpp b/src/SFML/Main/MainAndroid.cpp index 8afb32640..89edae23a 100644 --- a/src/SFML/Main/MainAndroid.cpp +++ b/src/SFML/Main/MainAndroid.cpp @@ -57,9 +57,7 @@ extern int main(int argc, char* argv[]); -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -149,8 +147,7 @@ void* main(ActivityStates* states) return nullptr; } -} // namespace priv -} // namespace sf +} // namespace sf::priv //////////////////////////////////////////////////////////// diff --git a/src/SFML/Network/Unix/SocketImpl.cpp b/src/SFML/Network/Unix/SocketImpl.cpp index 5f66ef6ad..e017a7dbf 100644 --- a/src/SFML/Network/Unix/SocketImpl.cpp +++ b/src/SFML/Network/Unix/SocketImpl.cpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// sockaddr_in SocketImpl::createAddress(std::uint32_t address, unsigned short port) @@ -109,6 +107,4 @@ Socket::Status SocketImpl::getErrorStatus() // clang-format on } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Network/Unix/SocketImpl.hpp b/src/SFML/Network/Unix/SocketImpl.hpp index 3e33292ba..87857c83f 100644 --- a/src/SFML/Network/Unix/SocketImpl.hpp +++ b/src/SFML/Network/Unix/SocketImpl.hpp @@ -39,9 +39,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Helper class implementing all the non-portable @@ -102,6 +100,4 @@ public: static Socket::Status getErrorStatus(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Network/Win32/SocketImpl.cpp b/src/SFML/Network/Win32/SocketImpl.cpp index 815d0172f..958e29b66 100644 --- a/src/SFML/Network/Win32/SocketImpl.cpp +++ b/src/SFML/Network/Win32/SocketImpl.cpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// sockaddr_in SocketImpl::createAddress(std::uint32_t address, unsigned short port) @@ -109,6 +107,4 @@ struct SocketInitializer SocketInitializer globalInitializer; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Network/Win32/SocketImpl.hpp b/src/SFML/Network/Win32/SocketImpl.hpp index 3efec3978..62ce5ee5f 100644 --- a/src/SFML/Network/Win32/SocketImpl.hpp +++ b/src/SFML/Network/Win32/SocketImpl.hpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Helper class implementing all the non-portable @@ -98,6 +96,4 @@ public: static Socket::Status getErrorStatus(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/System/Android/Activity.cpp b/src/SFML/System/Android/Activity.cpp index eb8906430..f7c61df64 100644 --- a/src/SFML/System/Android/Activity.cpp +++ b/src/SFML/System/Android/Activity.cpp @@ -54,9 +54,7 @@ std::streambuf::int_type LogcatStream::overflow(std::streambuf::int_type c) return traits_type::not_eof(c); } -namespace sf -{ -namespace priv +namespace sf::priv { ActivityStates*& getActivityStatesPtr() @@ -77,5 +75,4 @@ ActivityStates& getActivity() return *states; } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/System/Android/Activity.hpp b/src/SFML/System/Android/Activity.hpp index 596d2d300..a8038c771 100644 --- a/src/SFML/System/Android/Activity.hpp +++ b/src/SFML/System/Android/Activity.hpp @@ -50,9 +50,7 @@ private: std::string m_message; }; -namespace sf -{ -namespace priv +namespace sf::priv { struct ActivityStates { @@ -98,5 +96,4 @@ SFML_SYSTEM_API void resetActivity(ActivityStates* initializedStates); SFML_SYSTEM_API ActivityStates& getActivity(); -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/System/Android/ResourceStream.cpp b/src/SFML/System/Android/ResourceStream.cpp index b686837e7..900084733 100644 --- a/src/SFML/System/Android/ResourceStream.cpp +++ b/src/SFML/System/Android/ResourceStream.cpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -112,5 +110,4 @@ std::int64_t ResourceStream::getSize() } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/System/Android/ResourceStream.hpp b/src/SFML/System/Android/ResourceStream.hpp index d6afdc15b..d94e31997 100644 --- a/src/SFML/System/Android/ResourceStream.hpp +++ b/src/SFML/System/Android/ResourceStream.hpp @@ -37,9 +37,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Read from Android asset files @@ -106,6 +104,4 @@ private: AAsset* m_file; ///< The asset file to read }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/ClipboardImpl.cpp b/src/SFML/Window/Android/ClipboardImpl.cpp index 4cddf1490..ffcc4ee0a 100644 --- a/src/SFML/Window/Android/ClipboardImpl.cpp +++ b/src/SFML/Window/Android/ClipboardImpl.cpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// String ClipboardImpl::getString() @@ -50,6 +48,4 @@ void ClipboardImpl::setString(const String& /* text */) sf::err() << "Clipboard API not implemented for Android.\n"; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/CursorImpl.cpp b/src/SFML/Window/Android/CursorImpl.cpp index 5834b6645..9a507f0e2 100644 --- a/src/SFML/Window/Android/CursorImpl.cpp +++ b/src/SFML/Window/Android/CursorImpl.cpp @@ -27,9 +27,7 @@ //////////////////////////////////////////////////////////// #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool CursorImpl::loadFromPixels(const std::uint8_t* /* pixels */, Vector2u /* size */, Vector2u /* hotspot */) @@ -47,6 +45,4 @@ bool CursorImpl::loadFromSystem(Cursor::Type /* type */) } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/CursorImpl.hpp b/src/SFML/Window/Android/CursorImpl.hpp index 97a67836d..e3a16c77d 100644 --- a/src/SFML/Window/Android/CursorImpl.hpp +++ b/src/SFML/Window/Android/CursorImpl.hpp @@ -31,10 +31,7 @@ #include -namespace sf -{ - -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Android implementation of Cursor @@ -82,6 +79,4 @@ public: bool loadFromSystem(Cursor::Type type); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/InputImpl.cpp b/src/SFML/Window/Android/InputImpl.cpp index 3b560bf8f..34108c87a 100644 --- a/src/SFML/Window/Android/InputImpl.cpp +++ b/src/SFML/Window/Android/InputImpl.cpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool InputImpl::isKeyPressed(Keyboard::Key /* key */) @@ -205,6 +203,4 @@ Vector2i InputImpl::getTouchPosition(unsigned int finger, const WindowBase& /* r return getTouchPosition(finger); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/InputImpl.hpp b/src/SFML/Window/Android/InputImpl.hpp index 252e69069..b37958617 100644 --- a/src/SFML/Window/Android/InputImpl.hpp +++ b/src/SFML/Window/Android/InputImpl.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS implementation of inputs (keyboard + mouse) @@ -158,6 +156,4 @@ public: static Vector2i getTouchPosition(unsigned int finger, const WindowBase& relativeTo); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/JoystickImpl.cpp b/src/SFML/Window/Android/JoystickImpl.cpp index 847fd5e20..97a2f2c31 100644 --- a/src/SFML/Window/Android/JoystickImpl.cpp +++ b/src/SFML/Window/Android/JoystickImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -91,6 +89,4 @@ JoystickState JoystickImpl::update() return JoystickState(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/JoystickImpl.hpp b/src/SFML/Window/Android/JoystickImpl.hpp index 37e8247bb..30fb8edba 100644 --- a/src/SFML/Window/Android/JoystickImpl.hpp +++ b/src/SFML/Window/Android/JoystickImpl.hpp @@ -25,9 +25,7 @@ #pragma once -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Android implementation of joysticks @@ -105,6 +103,4 @@ private: Joystick::Identification m_identification; ///< Joystick identification }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/SensorImpl.cpp b/src/SFML/Window/Android/SensorImpl.cpp index bbfb4e471..db03c4b10 100644 --- a/src/SFML/Window/Android/SensorImpl.cpp +++ b/src/SFML/Window/Android/SensorImpl.cpp @@ -48,9 +48,7 @@ sf::Vector3f sensorData[sf::Sensor::Count]; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void SensorImpl::initialize() @@ -220,6 +218,4 @@ int SensorImpl::processSensorEvents(int /* fd */, int /* events */, void* /* sen return 1; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/SensorImpl.hpp b/src/SFML/Window/Android/SensorImpl.hpp index f5d2b6605..2dd065eb2 100644 --- a/src/SFML/Window/Android/SensorImpl.hpp +++ b/src/SFML/Window/Android/SensorImpl.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Android implementation of sensors @@ -127,6 +125,4 @@ private: unsigned int m_index; ///< Index of the sensor }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/VideoModeImpl.cpp b/src/SFML/Window/Android/VideoModeImpl.cpp index 6dd78cfb4..342d89241 100644 --- a/src/SFML/Window/Android/VideoModeImpl.cpp +++ b/src/SFML/Window/Android/VideoModeImpl.cpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() @@ -59,6 +57,4 @@ VideoMode VideoModeImpl::getDesktopMode() return VideoMode(Vector2u(states.screenSize)); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index d64ba7ea3..7f16d3f93 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -45,9 +45,7 @@ //////////////////////////////////////////////////////////// // Private data //////////////////////////////////////////////////////////// -namespace sf -{ -namespace priv +namespace sf::priv { WindowImplAndroid* WindowImplAndroid::singleInstance = nullptr; @@ -755,5 +753,4 @@ int WindowImplAndroid::getUnicode(AInputEvent* event) return unicode; } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Android/WindowImplAndroid.hpp b/src/SFML/Window/Android/WindowImplAndroid.hpp index 1c3506db2..4f9866c08 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.hpp +++ b/src/SFML/Window/Android/WindowImplAndroid.hpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Android implementation of WindowImpl @@ -237,6 +235,4 @@ private: bool m_hasFocus{}; }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/ClipboardImpl.cpp b/src/SFML/Window/DRM/ClipboardImpl.cpp index cd3128447..834c53aed 100644 --- a/src/SFML/Window/DRM/ClipboardImpl.cpp +++ b/src/SFML/Window/DRM/ClipboardImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// String ClipboardImpl::getString() @@ -44,6 +42,4 @@ void ClipboardImpl::setString(const String& /*text*/) { } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/ClipboardImpl.hpp b/src/SFML/Window/DRM/ClipboardImpl.hpp index 5b74d3a51..58af61fb1 100644 --- a/src/SFML/Window/DRM/ClipboardImpl.hpp +++ b/src/SFML/Window/DRM/ClipboardImpl.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Give access to the system clipboard @@ -66,6 +64,4 @@ public: static void setString(const String& text); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/CursorImpl.cpp b/src/SFML/Window/DRM/CursorImpl.cpp index 2baeb82ab..b4ba98d3d 100644 --- a/src/SFML/Window/DRM/CursorImpl.cpp +++ b/src/SFML/Window/DRM/CursorImpl.cpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool CursorImpl::loadFromPixels(const std::uint8_t* /*pixels*/, Vector2u /*size*/, Vector2u /*hotspot*/) @@ -74,6 +72,4 @@ void CursorImpl::release() { } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/CursorImpl.hpp b/src/SFML/Window/DRM/CursorImpl.hpp index 41f3fa05b..c9bb726e0 100644 --- a/src/SFML/Window/DRM/CursorImpl.hpp +++ b/src/SFML/Window/DRM/CursorImpl.hpp @@ -32,9 +32,7 @@ #include // Prevent conflict with macro None from Xlib -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Unix implementation of Cursor @@ -111,6 +109,4 @@ private: void release(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/DRMContext.cpp b/src/SFML/Window/DRM/DRMContext.cpp index ac85ad8ad..c32006243 100644 --- a/src/SFML/Window/DRM/DRMContext.cpp +++ b/src/SFML/Window/DRM/DRMContext.cpp @@ -506,9 +506,7 @@ EGLDisplay getInitializedDisplay() } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// DRMContext::DRMContext(DRMContext* shared) @@ -828,6 +826,4 @@ Drm& DRMContext::getDRM() return drmNode; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/DRMContext.hpp b/src/SFML/Window/DRM/DRMContext.hpp index 37e5dfda1..e63d1ae9f 100644 --- a/src/SFML/Window/DRM/DRMContext.hpp +++ b/src/SFML/Window/DRM/DRMContext.hpp @@ -39,9 +39,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { struct Drm { @@ -211,6 +209,4 @@ private: bool m_scanOut{}; }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/InputImplUDev.cpp b/src/SFML/Window/DRM/InputImplUDev.cpp index a4e5facd1..e9cedc8f7 100644 --- a/src/SFML/Window/DRM/InputImplUDev.cpp +++ b/src/SFML/Window/DRM/InputImplUDev.cpp @@ -560,9 +560,7 @@ void update() } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool InputImpl::isKeyPressed(Keyboard::Key key) @@ -719,6 +717,4 @@ void InputImpl::restoreTerminalConfig() tcflush(STDIN_FILENO, TCIFLUSH); // flush the buffer } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/InputImplUDev.hpp b/src/SFML/Window/DRM/InputImplUDev.hpp index c4adedd31..062fb04ae 100644 --- a/src/SFML/Window/DRM/InputImplUDev.hpp +++ b/src/SFML/Window/DRM/InputImplUDev.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux (DRM) implementation of inputs (keyboard + mouse) @@ -182,6 +180,4 @@ private: static void restoreTerminalConfig(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/VideoModeImpl.cpp b/src/SFML/Window/DRM/VideoModeImpl.cpp index c889da1f3..8380273b8 100644 --- a/src/SFML/Window/DRM/VideoModeImpl.cpp +++ b/src/SFML/Window/DRM/VideoModeImpl.cpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() @@ -65,6 +63,4 @@ VideoMode VideoModeImpl::getDesktopMode() return VideoMode({0, 0}); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/WindowImplDRM.cpp b/src/SFML/Window/DRM/WindowImplDRM.cpp index 7deac97a2..a0c2945f5 100644 --- a/src/SFML/Window/DRM/WindowImplDRM.cpp +++ b/src/SFML/Window/DRM/WindowImplDRM.cpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// WindowImplDRM::WindowImplDRM(WindowHandle /*handle*/) @@ -154,6 +152,4 @@ void WindowImplDRM::processEvents() pushEvent(ev); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/DRM/WindowImplDRM.hpp b/src/SFML/Window/DRM/WindowImplDRM.hpp index 3f6f31842..4fc48adf8 100644 --- a/src/SFML/Window/DRM/WindowImplDRM.hpp +++ b/src/SFML/Window/DRM/WindowImplDRM.hpp @@ -30,9 +30,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief DRM implementation of WindowImpl @@ -192,6 +190,4 @@ private: Vector2u m_size; ///< Window size }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/EGLCheck.cpp b/src/SFML/Window/EGLCheck.cpp index 8dd991bc1..6d0273abe 100644 --- a/src/SFML/Window/EGLCheck.cpp +++ b/src/SFML/Window/EGLCheck.cpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void eglCheckError(const std::filesystem::path& file, unsigned int line, const char* expression) @@ -170,5 +168,4 @@ void eglCheckError(const std::filesystem::path& file, unsigned int line, const c } } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/EGLCheck.hpp b/src/SFML/Window/EGLCheck.hpp index 39c5def1f..308eb0102 100644 --- a/src/SFML/Window/EGLCheck.hpp +++ b/src/SFML/Window/EGLCheck.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// Let's define a macro to quickly check every EGL API call @@ -67,5 +65,4 @@ namespace priv //////////////////////////////////////////////////////////// void eglCheckError(const std::filesystem::path& file, unsigned int line, const char* expression); -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/EglContext.cpp b/src/SFML/Window/EglContext.cpp index ea1e6a494..1ac315a2e 100644 --- a/src/SFML/Window/EglContext.cpp +++ b/src/SFML/Window/EglContext.cpp @@ -97,9 +97,7 @@ void ensureInit() } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// EglContext::EglContext(EglContext* shared) @@ -403,6 +401,4 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP } #endif -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/EglContext.hpp b/src/SFML/Window/EglContext.hpp index 6a4e27977..dbc0607d7 100644 --- a/src/SFML/Window/EglContext.hpp +++ b/src/SFML/Window/EglContext.hpp @@ -39,9 +39,7 @@ #include #endif -namespace sf -{ -namespace priv +namespace sf::priv { class EglContext : public GlContext { @@ -193,6 +191,4 @@ private: EGLConfig m_config{}; //!< The internal EGL config }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/FreeBSD/JoystickImpl.cpp b/src/SFML/Window/FreeBSD/JoystickImpl.cpp index 59a4fed53..cb24a7540 100644 --- a/src/SFML/Window/FreeBSD/JoystickImpl.cpp +++ b/src/SFML/Window/FreeBSD/JoystickImpl.cpp @@ -163,9 +163,7 @@ void hatValueToSfml(int value, sf::priv::JoystickState& state) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -348,6 +346,4 @@ JoystickState JoystickImpl::JoystickImpl::update() return m_state; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/FreeBSD/JoystickImpl.hpp b/src/SFML/Window/FreeBSD/JoystickImpl.hpp index 34e01e1c0..21fe5a554 100644 --- a/src/SFML/Window/FreeBSD/JoystickImpl.hpp +++ b/src/SFML/Window/FreeBSD/JoystickImpl.hpp @@ -31,9 +31,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief FreeBSD implementation of joysticks @@ -118,6 +116,4 @@ private: JoystickState m_state; ///< Current state of the joystick }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp index 40d02a9e0..ee1a82d2b 100644 --- a/src/SFML/Window/GlContext.cpp +++ b/src/SFML/Window/GlContext.cpp @@ -325,9 +325,7 @@ bool parseVersionString(const char* version, const char* prefix, unsigned int& m } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void GlContext::initResource() @@ -965,6 +963,4 @@ void GlContext::checkSettings(const ContextSettings& requestedSettings) } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/GlContext.hpp b/src/SFML/Window/GlContext.hpp index 8978b758f..bb460e298 100644 --- a/src/SFML/Window/GlContext.hpp +++ b/src/SFML/Window/GlContext.hpp @@ -37,9 +37,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImpl; @@ -322,6 +320,4 @@ private: const std::uint64_t m_id; //!< Unique number that identifies the context }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/JoystickImpl.hpp b/src/SFML/Window/JoystickImpl.hpp index 743fa14c8..a7b8a5449 100644 --- a/src/SFML/Window/JoystickImpl.hpp +++ b/src/SFML/Window/JoystickImpl.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Structure holding a joystick's information @@ -58,9 +56,7 @@ struct JoystickState bool buttons[Joystick::ButtonCount]{}; //!< Status of each button (true = pressed) }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv #if defined(SFML_SYSTEM_WINDOWS) diff --git a/src/SFML/Window/JoystickManager.cpp b/src/SFML/Window/JoystickManager.cpp index b665c0159..8d4d43235 100644 --- a/src/SFML/Window/JoystickManager.cpp +++ b/src/SFML/Window/JoystickManager.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// JoystickManager& JoystickManager::getInstance() @@ -118,6 +116,4 @@ JoystickManager::~JoystickManager() JoystickImpl::cleanup(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/JoystickManager.hpp b/src/SFML/Window/JoystickManager.hpp index da7dbe6f7..af77e5fdb 100644 --- a/src/SFML/Window/JoystickManager.hpp +++ b/src/SFML/Window/JoystickManager.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Global joystick manager @@ -129,6 +127,4 @@ private: Item m_joysticks[Joystick::Count]; //!< Joysticks information and state }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/NetBSD/JoystickImpl.cpp b/src/SFML/Window/NetBSD/JoystickImpl.cpp index 53dd5c6e0..4650eb7e7 100644 --- a/src/SFML/Window/NetBSD/JoystickImpl.cpp +++ b/src/SFML/Window/NetBSD/JoystickImpl.cpp @@ -164,9 +164,7 @@ void hatValueToSfml(int value, sf::priv::JoystickState& state) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -353,6 +351,4 @@ JoystickState JoystickImpl::JoystickImpl::update() return m_state; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/NetBSD/JoystickImpl.hpp b/src/SFML/Window/NetBSD/JoystickImpl.hpp index 19779b03f..a267fb8bc 100644 --- a/src/SFML/Window/NetBSD/JoystickImpl.hpp +++ b/src/SFML/Window/NetBSD/JoystickImpl.hpp @@ -32,9 +32,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief FreeBSD implementation of joysticks @@ -119,6 +117,4 @@ private: JoystickState m_state; ///< Current state of the joystick }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/ClipboardImpl.mm b/src/SFML/Window/OSX/ClipboardImpl.mm index 9a2dc52f3..523297872 100644 --- a/src/SFML/Window/OSX/ClipboardImpl.mm +++ b/src/SFML/Window/OSX/ClipboardImpl.mm @@ -31,9 +31,7 @@ #import -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -64,6 +62,4 @@ void ClipboardImpl::setString(const String& text) [data release]; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/CursorImpl.hpp b/src/SFML/Window/OSX/CursorImpl.hpp index e11f85f19..9fd8f82cb 100644 --- a/src/SFML/Window/OSX/CursorImpl.hpp +++ b/src/SFML/Window/OSX/CursorImpl.hpp @@ -45,10 +45,7 @@ using NSCursorRef = void*; #endif -namespace sf -{ - -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Mac OS X implementation of Cursor @@ -110,6 +107,4 @@ private: NSCursorRef m_cursor; ///< System cursor handle }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/CursorImpl.mm b/src/SFML/Window/OSX/CursorImpl.mm index 194cd8110..83df00ab6 100644 --- a/src/SFML/Window/OSX/CursorImpl.mm +++ b/src/SFML/Window/OSX/CursorImpl.mm @@ -47,9 +47,7 @@ NSCursor* loadFromSelector(SEL selector) } -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -141,6 +139,4 @@ bool CursorImpl::loadFromSystem(Cursor::Type type) } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/HIDInputManager.hpp b/src/SFML/Window/OSX/HIDInputManager.hpp index d4697fa09..5e2b449d2 100644 --- a/src/SFML/Window/OSX/HIDInputManager.hpp +++ b/src/SFML/Window/OSX/HIDInputManager.hpp @@ -36,9 +36,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { using IOHIDElements = std::vector; @@ -236,6 +234,4 @@ private: //////////////////////////////////////////////////////////// }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/HIDInputManager.mm b/src/SFML/Window/OSX/HIDInputManager.mm index 4539d6feb..1bc4108eb 100644 --- a/src/SFML/Window/OSX/HIDInputManager.mm +++ b/src/SFML/Window/OSX/HIDInputManager.mm @@ -32,9 +32,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// HIDInputManager& HIDInputManager::getInstance() @@ -866,6 +864,4 @@ Keyboard::Key HIDInputManager::nonLocalizedKeys(UniChar virtualKeycode) } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/HIDJoystickManager.cpp b/src/SFML/Window/OSX/HIDJoystickManager.cpp index 8d83c3529..ae9131541 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.cpp +++ b/src/SFML/Window/OSX/HIDJoystickManager.cpp @@ -40,9 +40,7 @@ const CFStringRef runLoopMode = CFSTR("SFML_RUN_LOOP_MODE"); } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// HIDJoystickManager& HIDJoystickManager::getInstance() @@ -138,6 +136,4 @@ void HIDJoystickManager::pluggedOut(void* context, IOReturn, void*, IOHIDDeviceR } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/HIDJoystickManager.hpp b/src/SFML/Window/OSX/HIDJoystickManager.hpp index d9cf7af59..233c41a3b 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.hpp +++ b/src/SFML/Window/OSX/HIDJoystickManager.hpp @@ -31,9 +31,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief sf::priv::InputImpl helper @@ -127,6 +125,4 @@ private: }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/InputImpl.hpp b/src/SFML/Window/OSX/InputImpl.hpp index 306f788cd..80c81e35f 100644 --- a/src/SFML/Window/OSX/InputImpl.hpp +++ b/src/SFML/Window/OSX/InputImpl.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Mac OS X implementation of inputs (keyboard + mouse) @@ -159,6 +157,4 @@ public: static Vector2i getTouchPosition(unsigned int finger, const WindowBase& relativeTo); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/InputImpl.mm b/src/SFML/Window/OSX/InputImpl.mm index f1fa437bc..e3d07b004 100644 --- a/src/SFML/Window/OSX/InputImpl.mm +++ b/src/SFML/Window/OSX/InputImpl.mm @@ -46,9 +46,7 @@ /// //////////////////////////////////////////////////////////// -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Extract the dedicated SFOpenGLView from the SFML window @@ -236,6 +234,4 @@ Vector2i InputImpl::getTouchPosition(unsigned int /*finger*/, const WindowBase& return Vector2i(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/JoystickImpl.cpp b/src/SFML/Window/OSX/JoystickImpl.cpp index 3f5f7559d..183a91de5 100644 --- a/src/SFML/Window/OSX/JoystickImpl.cpp +++ b/src/SFML/Window/OSX/JoystickImpl.cpp @@ -86,9 +86,7 @@ unsigned int getDeviceUint(IOHIDDeviceRef ref, CFStringRef prop, unsigned int in } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// JoystickImpl::Location JoystickImpl::m_locationIDs[sf::Joystick::Count] = {0}; @@ -550,6 +548,4 @@ JoystickState JoystickImpl::update() return state; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/JoystickImpl.hpp b/src/SFML/Window/OSX/JoystickImpl.hpp index 949455326..0fee79f20 100644 --- a/src/SFML/Window/OSX/JoystickImpl.hpp +++ b/src/SFML/Window/OSX/JoystickImpl.hpp @@ -36,9 +36,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Mac OS X implementation of joysticks @@ -129,6 +127,4 @@ private: /// location or 0 if there isn't currently a connected joystick device }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/SFContext.hpp b/src/SFML/Window/OSX/SFContext.hpp index 627f83017..a122bace2 100644 --- a/src/SFML/Window/OSX/SFContext.hpp +++ b/src/SFML/Window/OSX/SFContext.hpp @@ -53,9 +53,7 @@ using NSWindowRef = void*; #endif -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief OSX (Cocoa) implementation of OpenGL contexts @@ -160,6 +158,4 @@ private: NSWindowRef m_window{}; ///< Only for offscreen context. }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/SFContext.mm b/src/SFML/Window/OSX/SFContext.mm index 0529b7f90..ebe03a486 100644 --- a/src/SFML/Window/OSX/SFContext.mm +++ b/src/SFML/Window/OSX/SFContext.mm @@ -37,11 +37,8 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -namespace sf +namespace sf::priv { -namespace priv -{ - //////////////////////////////////////////////////////////// SFContext::SFContext(SFContext* shared) @@ -293,6 +290,4 @@ void SFContext::createContext(SFContext* shared, unsigned int bitsPerPixel, cons [pixFmt release]; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h index a34b00eb0..8c993660e 100644 --- a/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h +++ b/src/SFML/Window/OSX/SFKeyboardModifiersHelper.h @@ -30,13 +30,10 @@ #import -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImplCocoa; } -} //////////////////////////////////////////////////////////// /// Keyboard Modifiers Helper diff --git a/src/SFML/Window/OSX/SFOpenGLView.h b/src/SFML/Window/OSX/SFOpenGLView.h index 7ee094297..d2f9fad3f 100644 --- a/src/SFML/Window/OSX/SFOpenGLView.h +++ b/src/SFML/Window/OSX/SFOpenGLView.h @@ -31,13 +31,10 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImplCocoa; } -} @class SFSilentResponder; diff --git a/src/SFML/Window/OSX/SFWindowController.h b/src/SFML/Window/OSX/SFWindowController.h index abe85b255..85053fab9 100644 --- a/src/SFML/Window/OSX/SFWindowController.h +++ b/src/SFML/Window/OSX/SFWindowController.h @@ -32,13 +32,10 @@ //////////////////////////////////////////////////////////// /// Predefine some classes //////////////////////////////////////////////////////////// -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImplCocoa; } -} @class SFOpenGLView; diff --git a/src/SFML/Window/OSX/Scaling.h b/src/SFML/Window/OSX/Scaling.h index 6961c8006..f5f62bc31 100644 --- a/src/SFML/Window/OSX/Scaling.h +++ b/src/SFML/Window/OSX/Scaling.h @@ -30,9 +30,7 @@ #import -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -98,5 +96,4 @@ void scaleOutXY(T& out, id delegate) scaleOut(out.y, delegate); } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/SensorImpl.cpp b/src/SFML/Window/OSX/SensorImpl.cpp index bdd1c3323..114eeaa4d 100644 --- a/src/SFML/Window/OSX/SensorImpl.cpp +++ b/src/SFML/Window/OSX/SensorImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void SensorImpl::initialize() @@ -83,6 +81,4 @@ void SensorImpl::setEnabled(bool /*enabled*/) // To be implemented } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/SensorImpl.hpp b/src/SFML/Window/OSX/SensorImpl.hpp index 083f0f7b6..aa207f819 100644 --- a/src/SFML/Window/OSX/SensorImpl.hpp +++ b/src/SFML/Window/OSX/SensorImpl.hpp @@ -25,9 +25,7 @@ #pragma once -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Mac OS X implementation of sensors @@ -91,6 +89,4 @@ public: void setEnabled(bool enabled); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/VideoModeImpl.cpp b/src/SFML/Window/OSX/VideoModeImpl.cpp index 660f74afc..d35efdfa1 100644 --- a/src/SFML/Window/OSX/VideoModeImpl.cpp +++ b/src/SFML/Window/OSX/VideoModeImpl.cpp @@ -33,9 +33,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -96,5 +94,4 @@ VideoMode VideoModeImpl::getDesktopMode() return mode; } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/WindowImplCocoa.mm b/src/SFML/Window/OSX/WindowImplCocoa.mm index 1080a1aef..2e36a91a7 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.mm +++ b/src/SFML/Window/OSX/WindowImplCocoa.mm @@ -40,9 +40,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -525,6 +523,4 @@ bool WindowImplCocoa::hasFocus() const } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/WindowImplDelegateProtocol.h b/src/SFML/Window/OSX/WindowImplDelegateProtocol.h index fe93f56c8..2f68bcfc8 100644 --- a/src/SFML/Window/OSX/WindowImplDelegateProtocol.h +++ b/src/SFML/Window/OSX/WindowImplDelegateProtocol.h @@ -36,13 +36,10 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImplCocoa; } -} //////////////////////////////////////////////////////////// /// \brief Interface of the delegate of the window implementation diff --git a/src/SFML/Window/OSX/cg_sf_conversion.hpp b/src/SFML/Window/OSX/cg_sf_conversion.hpp index 406de990d..ccca9d497 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.hpp +++ b/src/SFML/Window/OSX/cg_sf_conversion.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Get bpp of a video mode for OS 10.6 or later @@ -66,5 +64,4 @@ VideoMode convertCGModeToSFMode(CGDisplayModeRef cgmode); //////////////////////////////////////////////////////////// CGDisplayModeRef convertSFModeToCGMode(VideoMode sfmode); -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OSX/cg_sf_conversion.mm b/src/SFML/Window/OSX/cg_sf_conversion.mm index 4800bb773..d41f38ffa 100644 --- a/src/SFML/Window/OSX/cg_sf_conversion.mm +++ b/src/SFML/Window/OSX/cg_sf_conversion.mm @@ -32,9 +32,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -95,5 +93,4 @@ VideoMode convertCGModeToSFMode(CGDisplayModeRef cgmode) return mode; } -} // namespace priv -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OpenBSD/JoystickImpl.cpp b/src/SFML/Window/OpenBSD/JoystickImpl.cpp index 30f6b5004..ec8d45969 100644 --- a/src/SFML/Window/OpenBSD/JoystickImpl.cpp +++ b/src/SFML/Window/OpenBSD/JoystickImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -91,6 +89,4 @@ JoystickState JoystickImpl::update() return JoystickState(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/OpenBSD/JoystickImpl.hpp b/src/SFML/Window/OpenBSD/JoystickImpl.hpp index 480843354..e25543aa8 100644 --- a/src/SFML/Window/OpenBSD/JoystickImpl.hpp +++ b/src/SFML/Window/OpenBSD/JoystickImpl.hpp @@ -25,9 +25,7 @@ #pragma once -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief OpenBSD implementation of joysticks @@ -106,6 +104,4 @@ private: Joystick::Identification m_identification; ///< Joystick identification }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/SensorManager.cpp b/src/SFML/Window/SensorManager.cpp index 401b6480f..caf9f4890 100644 --- a/src/SFML/Window/SensorManager.cpp +++ b/src/SFML/Window/SensorManager.cpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// SensorManager& SensorManager::getInstance() @@ -134,6 +132,4 @@ SensorManager::~SensorManager() SensorImpl::cleanup(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/SensorManager.hpp b/src/SFML/Window/SensorManager.hpp index de135e68f..31fe6e364 100644 --- a/src/SFML/Window/SensorManager.hpp +++ b/src/SFML/Window/SensorManager.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Global sensor manager @@ -138,6 +136,4 @@ private: Item m_sensors[Sensor::Count]; //!< Sensors information and state }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/ClipboardImpl.cpp b/src/SFML/Window/Unix/ClipboardImpl.cpp index a6eac3bfa..60bc5902b 100644 --- a/src/SFML/Window/Unix/ClipboardImpl.cpp +++ b/src/SFML/Window/Unix/ClipboardImpl.cpp @@ -47,9 +47,7 @@ Bool checkEvent(::Display*, XEvent* event, XPointer userData) } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -380,6 +378,4 @@ void ClipboardImpl::processEvent(XEvent& windowEvent) } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/ClipboardImpl.hpp b/src/SFML/Window/Unix/ClipboardImpl.hpp index c3945f069..537c9f465 100644 --- a/src/SFML/Window/Unix/ClipboardImpl.hpp +++ b/src/SFML/Window/Unix/ClipboardImpl.hpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -147,6 +145,4 @@ private: bool m_requestResponded{}; ///< Holds whether our selection request has been responded to or not }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/CursorImpl.cpp b/src/SFML/Window/Unix/CursorImpl.cpp index d0b46e0b8..ec47ef6f7 100644 --- a/src/SFML/Window/Unix/CursorImpl.cpp +++ b/src/SFML/Window/Unix/CursorImpl.cpp @@ -36,9 +36,7 @@ #include #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -216,6 +214,4 @@ void CursorImpl::release() } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/CursorImpl.hpp b/src/SFML/Window/Unix/CursorImpl.hpp index a5bee9e6a..7ebb10154 100644 --- a/src/SFML/Window/Unix/CursorImpl.hpp +++ b/src/SFML/Window/Unix/CursorImpl.hpp @@ -33,10 +33,7 @@ #include -namespace sf -{ - -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Unix implementation of Cursor @@ -127,6 +124,4 @@ private: ::Cursor m_cursor{None}; }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/Display.cpp b/src/SFML/Window/Unix/Display.cpp index 09a98da95..eddb87133 100644 --- a/src/SFML/Window/Unix/Display.cpp +++ b/src/SFML/Window/Unix/Display.cpp @@ -50,9 +50,7 @@ using AtomMap = std::unordered_map; AtomMap atoms; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// Display* openDisplay() @@ -157,6 +155,4 @@ Atom getAtom(const std::string& name, bool onlyIfExists) return atom; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/Display.hpp b/src/SFML/Window/Unix/Display.hpp index df616692e..5b34772e8 100644 --- a/src/SFML/Window/Unix/Display.hpp +++ b/src/SFML/Window/Unix/Display.hpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Get the shared Display @@ -89,6 +87,4 @@ void closeXim(XIM xim); //////////////////////////////////////////////////////////// Atom getAtom(const std::string& name, bool onlyIfExists = false); -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/GlxContext.cpp b/src/SFML/Window/Unix/GlxContext.cpp index 6e31cd56f..d59f45a73 100644 --- a/src/SFML/Window/Unix/GlxContext.cpp +++ b/src/SFML/Window/Unix/GlxContext.cpp @@ -101,9 +101,7 @@ private: } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// GlxContext::GlxContext(GlxContext* shared) @@ -784,6 +782,4 @@ void GlxContext::createContext(GlxContext* shared) XFree(visualInfo); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/GlxContext.hpp b/src/SFML/Window/Unix/GlxContext.hpp index 1f545f9ba..76a9a0dd9 100644 --- a/src/SFML/Window/Unix/GlxContext.hpp +++ b/src/SFML/Window/Unix/GlxContext.hpp @@ -34,9 +34,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux (GLX) implementation of OpenGL contexts @@ -182,6 +180,4 @@ private: bool m_ownsWindow{}; ///< Do we own the window associated to the context? }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/InputImpl.cpp b/src/SFML/Window/Unix/InputImpl.cpp index 085c8de4b..90b0faee8 100644 --- a/src/SFML/Window/Unix/InputImpl.cpp +++ b/src/SFML/Window/Unix/InputImpl.cpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool InputImpl::isKeyPressed(Keyboard::Key key) @@ -332,6 +330,4 @@ Vector2i InputImpl::getTouchPosition(unsigned int /*finger*/, const WindowBase& return Vector2i(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/InputImpl.hpp b/src/SFML/Window/Unix/InputImpl.hpp index 834b9283e..182ce2969 100644 --- a/src/SFML/Window/Unix/InputImpl.hpp +++ b/src/SFML/Window/Unix/InputImpl.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux (X11) implementation of inputs (keyboard + mouse) @@ -158,6 +156,4 @@ public: static Vector2i getTouchPosition(unsigned int finger, const WindowBase& relativeTo); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/JoystickImpl.cpp b/src/SFML/Window/Unix/JoystickImpl.cpp index 2c9782144..cb1e988d3 100644 --- a/src/SFML/Window/Unix/JoystickImpl.cpp +++ b/src/SFML/Window/Unix/JoystickImpl.cpp @@ -430,9 +430,7 @@ std::string getJoystickName(unsigned int index) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -711,6 +709,4 @@ JoystickState JoystickImpl::JoystickImpl::update() return m_state; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/JoystickImpl.hpp b/src/SFML/Window/Unix/JoystickImpl.hpp index 9e4e3e15d..8ba205300 100644 --- a/src/SFML/Window/Unix/JoystickImpl.hpp +++ b/src/SFML/Window/Unix/JoystickImpl.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux implementation of joysticks @@ -115,6 +113,4 @@ private: sf::Joystick::Identification m_identification; ///< Identification of the joystick }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/SensorImpl.cpp b/src/SFML/Window/Unix/SensorImpl.cpp index bdd1c3323..114eeaa4d 100644 --- a/src/SFML/Window/Unix/SensorImpl.cpp +++ b/src/SFML/Window/Unix/SensorImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void SensorImpl::initialize() @@ -83,6 +81,4 @@ void SensorImpl::setEnabled(bool /*enabled*/) // To be implemented } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/SensorImpl.hpp b/src/SFML/Window/Unix/SensorImpl.hpp index e7ac7e763..7bfc524fe 100644 --- a/src/SFML/Window/Unix/SensorImpl.hpp +++ b/src/SFML/Window/Unix/SensorImpl.hpp @@ -25,9 +25,7 @@ #pragma once -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Unix implementation of sensors @@ -91,6 +89,4 @@ public: void setEnabled(bool enabled); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/VideoModeImpl.cpp b/src/SFML/Window/Unix/VideoModeImpl.cpp index 60542ffb3..977e2cb2b 100644 --- a/src/SFML/Window/Unix/VideoModeImpl.cpp +++ b/src/SFML/Window/Unix/VideoModeImpl.cpp @@ -36,9 +36,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() @@ -194,6 +192,4 @@ VideoMode VideoModeImpl::getDesktopMode() return desktopMode; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/VulkanImplX11.cpp b/src/SFML/Window/Unix/VulkanImplX11.cpp index 81520b197..820c91381 100644 --- a/src/SFML/Window/Unix/VulkanImplX11.cpp +++ b/src/SFML/Window/Unix/VulkanImplX11.cpp @@ -101,9 +101,7 @@ VulkanLibraryWrapper wrapper; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool VulkanImplX11::isAvailable(bool requireGraphics) @@ -213,6 +211,4 @@ bool VulkanImplX11::createVulkanSurface(const VkInstance& instance, return result; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/VulkanImplX11.hpp b/src/SFML/Window/Unix/VulkanImplX11.hpp index 24b461ddd..ab177687f 100644 --- a/src/SFML/Window/Unix/VulkanImplX11.hpp +++ b/src/SFML/Window/Unix/VulkanImplX11.hpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux (X11) implementation of Vulkan @@ -97,6 +95,4 @@ public: const VkAllocationCallbacks* allocator); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/WindowImplX11.cpp b/src/SFML/Window/Unix/WindowImplX11.cpp index 472e16e18..3ab400b82 100644 --- a/src/SFML/Window/Unix/WindowImplX11.cpp +++ b/src/SFML/Window/Unix/WindowImplX11.cpp @@ -473,9 +473,7 @@ sf::Keyboard::Key keysymToSF(KeySym symbol) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// WindowImplX11::WindowImplX11(WindowHandle handle) : m_isExternal(true) @@ -2257,6 +2255,4 @@ Vector2i WindowImplX11::getPrimaryMonitorPosition() return monitorPosition; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Unix/WindowImplX11.hpp b/src/SFML/Window/Unix/WindowImplX11.hpp index bd2e6534a..6001bb85a 100644 --- a/src/SFML/Window/Unix/WindowImplX11.hpp +++ b/src/SFML/Window/Unix/WindowImplX11.hpp @@ -37,9 +37,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Linux (X11) implementation of WindowImpl @@ -317,6 +315,4 @@ private: ::Time m_lastInputTime{}; ///< Last time we received user input }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/VideoModeImpl.hpp b/src/SFML/Window/VideoModeImpl.hpp index 42614f35b..a66ef070b 100644 --- a/src/SFML/Window/VideoModeImpl.hpp +++ b/src/SFML/Window/VideoModeImpl.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief OS-specific implementation of video modes functions @@ -58,6 +56,4 @@ public: static VideoMode getDesktopMode(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/ClipboardImpl.cpp b/src/SFML/Window/Win32/ClipboardImpl.cpp index 5f9e5cab6..fe5a8ee34 100644 --- a/src/SFML/Window/Win32/ClipboardImpl.cpp +++ b/src/SFML/Window/Win32/ClipboardImpl.cpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// String ClipboardImpl::getString() @@ -100,6 +98,4 @@ void ClipboardImpl::setString(const String& text) CloseClipboard(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/CursorImpl.cpp b/src/SFML/Window/Win32/CursorImpl.cpp index d268e22b9..fe258334b 100644 --- a/src/SFML/Window/Win32/CursorImpl.cpp +++ b/src/SFML/Window/Win32/CursorImpl.cpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// CursorImpl::~CursorImpl() @@ -185,6 +183,4 @@ void CursorImpl::release() } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/CursorImpl.hpp b/src/SFML/Window/Win32/CursorImpl.hpp index 57ace64c4..2afdd9b39 100644 --- a/src/SFML/Window/Win32/CursorImpl.hpp +++ b/src/SFML/Window/Win32/CursorImpl.hpp @@ -30,10 +30,7 @@ #include #include -namespace sf -{ - -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Win32 implementation of Cursor @@ -102,6 +99,4 @@ private: bool m_systemCursor{}; }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/InputImpl.cpp b/src/SFML/Window/Win32/InputImpl.cpp index bcf2f77d7..a403000cc 100644 --- a/src/SFML/Window/Win32/InputImpl.cpp +++ b/src/SFML/Window/Win32/InputImpl.cpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool InputImpl::isKeyPressed(Keyboard::Key key) @@ -258,6 +256,4 @@ Vector2i InputImpl::getTouchPosition(unsigned int /*finger*/, const WindowBase& return Vector2i(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/InputImpl.hpp b/src/SFML/Window/Win32/InputImpl.hpp index f515a2c58..5c84955b8 100644 --- a/src/SFML/Window/Win32/InputImpl.hpp +++ b/src/SFML/Window/Win32/InputImpl.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Windows implementation of inputs (keyboard + mouse) @@ -158,6 +156,4 @@ public: static Vector2i getTouchPosition(unsigned int finger, const WindowBase& relativeTo); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index 6af4d1170..c52395f79 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -217,9 +217,7 @@ sf::String getDeviceName(unsigned int index, JOYCAPS caps) } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -1171,6 +1169,4 @@ BOOL CALLBACK JoystickImpl::deviceObjectEnumerationCallback(const DIDEVICEOBJECT return DIENUM_CONTINUE; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/JoystickImpl.hpp b/src/SFML/Window/Win32/JoystickImpl.hpp index c35d2d1e0..7617f9e2a 100644 --- a/src/SFML/Window/Win32/JoystickImpl.hpp +++ b/src/SFML/Window/Win32/JoystickImpl.hpp @@ -35,9 +35,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Windows implementation of joysticks @@ -227,6 +225,4 @@ private: bool m_buffered; //!< true if the device uses buffering, false if the device uses polling }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/SensorImpl.cpp b/src/SFML/Window/Win32/SensorImpl.cpp index bdd1c3323..114eeaa4d 100644 --- a/src/SFML/Window/Win32/SensorImpl.cpp +++ b/src/SFML/Window/Win32/SensorImpl.cpp @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void SensorImpl::initialize() @@ -83,6 +81,4 @@ void SensorImpl::setEnabled(bool /*enabled*/) // To be implemented } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/SensorImpl.hpp b/src/SFML/Window/Win32/SensorImpl.hpp index f7c61dc81..cb22f7dd7 100644 --- a/src/SFML/Window/Win32/SensorImpl.hpp +++ b/src/SFML/Window/Win32/SensorImpl.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Windows implementation of sensors @@ -96,6 +94,4 @@ public: void setEnabled(bool enabled); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/VideoModeImpl.cpp b/src/SFML/Window/Win32/VideoModeImpl.cpp index 47c3d6fc8..5ecd05173 100644 --- a/src/SFML/Window/Win32/VideoModeImpl.cpp +++ b/src/SFML/Window/Win32/VideoModeImpl.cpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() @@ -69,6 +67,4 @@ VideoMode VideoModeImpl::getDesktopMode() return VideoMode({win32Mode.dmPelsWidth, win32Mode.dmPelsHeight}, win32Mode.dmBitsPerPel); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/VulkanImplWin32.cpp b/src/SFML/Window/Win32/VulkanImplWin32.cpp index 023d1e855..c7ee8c795 100644 --- a/src/SFML/Window/Win32/VulkanImplWin32.cpp +++ b/src/SFML/Window/Win32/VulkanImplWin32.cpp @@ -100,9 +100,7 @@ VulkanLibraryWrapper wrapper; } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool VulkanImplWin32::isAvailable(bool requireGraphics) @@ -206,6 +204,4 @@ bool VulkanImplWin32::createVulkanSurface(const VkInstance& instance, return (vkCreateWin32SurfaceKHR(instance, &surfaceCreateInfo, allocator, &surface) == VK_SUCCESS); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/VulkanImplWin32.hpp b/src/SFML/Window/Win32/VulkanImplWin32.hpp index e00fa60c7..ad07acfad 100644 --- a/src/SFML/Window/Win32/VulkanImplWin32.hpp +++ b/src/SFML/Window/Win32/VulkanImplWin32.hpp @@ -33,9 +33,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Windows implementation of Vulkan @@ -97,6 +95,4 @@ public: const VkAllocationCallbacks* allocator); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/WglContext.cpp b/src/SFML/Window/Win32/WglContext.cpp index 1c546b5a3..788f1419c 100644 --- a/src/SFML/Window/Win32/WglContext.cpp +++ b/src/SFML/Window/Win32/WglContext.cpp @@ -81,9 +81,7 @@ void ensureExtensionsInit(HDC deviceContext) } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// String getErrorString(DWORD errorCode) @@ -779,6 +777,4 @@ void WglContext::createContext(WglContext* shared) } } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/WglContext.hpp b/src/SFML/Window/Win32/WglContext.hpp index db3de98c8..5cd9461ee 100644 --- a/src/SFML/Window/Win32/WglContext.hpp +++ b/src/SFML/Window/Win32/WglContext.hpp @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief Windows (WGL) implementation of OpenGL contexts @@ -185,6 +183,4 @@ private: bool m_ownsWindow{}; //!< Do we own the target window? }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index 6e70b07bd..87e3f1dca 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -125,9 +125,7 @@ void setProcessDpiAware() } } // namespace -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// WindowImplWin32::WindowImplWin32(WindowHandle handle) : m_handle(handle) @@ -1157,6 +1155,4 @@ LRESULT CALLBACK WindowImplWin32::globalOnEvent(HWND handle, UINT message, WPARA return DefWindowProcW(handle, message, wParam, lParam); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index e621d5a1f..dc3aedacb 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -89,9 +89,7 @@ using WindowImplType = sf::priv::WindowImplAndroid; #endif -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -310,6 +308,4 @@ bool WindowImpl::createVulkanSurface([[maybe_unused]] const VkInstance& #endif } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/ClipboardImpl.mm b/src/SFML/Window/iOS/ClipboardImpl.mm index 50aad8cc7..e750919e8 100644 --- a/src/SFML/Window/iOS/ClipboardImpl.mm +++ b/src/SFML/Window/iOS/ClipboardImpl.mm @@ -30,9 +30,7 @@ #import -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// @@ -65,6 +63,4 @@ void ClipboardImpl::setString(const String& text) pboard.string = data; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/CursorImpl.cpp b/src/SFML/Window/iOS/CursorImpl.cpp index a889d4e2e..63821ddc2 100644 --- a/src/SFML/Window/iOS/CursorImpl.cpp +++ b/src/SFML/Window/iOS/CursorImpl.cpp @@ -27,9 +27,7 @@ //////////////////////////////////////////////////////////// #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool CursorImpl::loadFromPixels(const std::uint8_t* /* pixels */, Vector2u /* size */, Vector2u /* hotspot */) @@ -47,6 +45,4 @@ bool CursorImpl::loadFromSystem(Cursor::Type /* type */) } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/CursorImpl.hpp b/src/SFML/Window/iOS/CursorImpl.hpp index 274142976..782eb4b5e 100644 --- a/src/SFML/Window/iOS/CursorImpl.hpp +++ b/src/SFML/Window/iOS/CursorImpl.hpp @@ -31,10 +31,7 @@ #include -namespace sf -{ - -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS implementation of Cursor @@ -82,6 +79,4 @@ public: bool loadFromSystem(Cursor::Type type); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/EaglContext.hpp b/src/SFML/Window/iOS/EaglContext.hpp index 3c90f6290..13c7b028b 100644 --- a/src/SFML/Window/iOS/EaglContext.hpp +++ b/src/SFML/Window/iOS/EaglContext.hpp @@ -40,9 +40,7 @@ SFML_DECLARE_OBJC_CLASS(EAGLContext); SFML_DECLARE_OBJC_CLASS(SFView); -namespace sf -{ -namespace priv +namespace sf::priv { class WindowImplUIKit; @@ -166,8 +164,6 @@ private: Clock m_clock; ///< Measures the elapsed time for the fake v-sync implementation }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv #pragma GCC diagnostic pop diff --git a/src/SFML/Window/iOS/EaglContext.mm b/src/SFML/Window/iOS/EaglContext.mm index 7ac51bad4..8f6f80936 100644 --- a/src/SFML/Window/iOS/EaglContext.mm +++ b/src/SFML/Window/iOS/EaglContext.mm @@ -88,9 +88,7 @@ void ensureInit() } -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// EaglContext::EaglContext(EaglContext* shared) : m_context(nil) @@ -315,6 +313,4 @@ void EaglContext::createContext(EaglContext* shared, makeCurrent(false); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/InputImpl.hpp b/src/SFML/Window/iOS/InputImpl.hpp index 95ae377a6..3d3b42a00 100644 --- a/src/SFML/Window/iOS/InputImpl.hpp +++ b/src/SFML/Window/iOS/InputImpl.hpp @@ -31,9 +31,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS implementation of inputs (keyboard + mouse) @@ -158,6 +156,4 @@ public: static Vector2i getTouchPosition(unsigned int finger, const WindowBase& relativeTo); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/InputImpl.mm b/src/SFML/Window/iOS/InputImpl.mm index 732f4b248..6466bf7ef 100644 --- a/src/SFML/Window/iOS/InputImpl.mm +++ b/src/SFML/Window/iOS/InputImpl.mm @@ -32,9 +32,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// bool InputImpl::isKeyPressed(Keyboard::Key /* key */) @@ -107,6 +105,4 @@ Vector2i InputImpl::getTouchPosition(unsigned int finger, const WindowBase& /* r return getTouchPosition(finger); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/JoystickImpl.hpp b/src/SFML/Window/iOS/JoystickImpl.hpp index fcdce0efd..521e96e7b 100644 --- a/src/SFML/Window/iOS/JoystickImpl.hpp +++ b/src/SFML/Window/iOS/JoystickImpl.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS implementation of joysticks @@ -104,6 +102,4 @@ public: [[nodiscard]] JoystickState update(); }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/JoystickImpl.mm b/src/SFML/Window/iOS/JoystickImpl.mm index 8176e9ab2..285aa8cdf 100644 --- a/src/SFML/Window/iOS/JoystickImpl.mm +++ b/src/SFML/Window/iOS/JoystickImpl.mm @@ -28,9 +28,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void JoystickImpl::initialize() @@ -92,6 +90,4 @@ JoystickState JoystickImpl::update() return JoystickState(); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/SensorImpl.hpp b/src/SFML/Window/iOS/SensorImpl.hpp index 5c0498215..8a89bb763 100644 --- a/src/SFML/Window/iOS/SensorImpl.hpp +++ b/src/SFML/Window/iOS/SensorImpl.hpp @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS implementation of sensors @@ -103,6 +101,4 @@ private: bool m_enabled; ///< Enable state of the sensor }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/SensorImpl.mm b/src/SFML/Window/iOS/SensorImpl.mm index 3a4e3a6e5..6b7c1b4ad 100644 --- a/src/SFML/Window/iOS/SensorImpl.mm +++ b/src/SFML/Window/iOS/SensorImpl.mm @@ -41,9 +41,7 @@ float toDegrees(float radians) } -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// void SensorImpl::initialize() @@ -238,6 +236,4 @@ void SensorImpl::setEnabled(bool enabled) m_enabled = enabled; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/VideoModeImpl.mm b/src/SFML/Window/iOS/VideoModeImpl.mm index 51286d254..ec002ff1d 100644 --- a/src/SFML/Window/iOS/VideoModeImpl.mm +++ b/src/SFML/Window/iOS/VideoModeImpl.mm @@ -30,9 +30,7 @@ #include -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// std::vector VideoModeImpl::getFullscreenModes() @@ -56,6 +54,4 @@ VideoMode VideoModeImpl::getDesktopMode() static_cast(bounds.size.height * backingScale)}); } -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/WindowImplUIKit.hpp b/src/SFML/Window/iOS/WindowImplUIKit.hpp index a73a943e4..6c96bbdc9 100644 --- a/src/SFML/Window/iOS/WindowImplUIKit.hpp +++ b/src/SFML/Window/iOS/WindowImplUIKit.hpp @@ -37,9 +37,7 @@ SFML_DECLARE_OBJC_CLASS(SFView); SFML_DECLARE_OBJC_CLASS(SFViewController); -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// /// \brief iOS (UIKit) implementation of WindowImpl @@ -222,6 +220,4 @@ private: float m_backingScale; ///< Converts from points to pixels and vice versa }; -} // namespace priv - -} // namespace sf +} // namespace sf::priv diff --git a/src/SFML/Window/iOS/WindowImplUIKit.mm b/src/SFML/Window/iOS/WindowImplUIKit.mm index 26b1842af..05b40a647 100644 --- a/src/SFML/Window/iOS/WindowImplUIKit.mm +++ b/src/SFML/Window/iOS/WindowImplUIKit.mm @@ -36,9 +36,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -namespace sf -{ -namespace priv +namespace sf::priv { //////////////////////////////////////////////////////////// WindowImplUIKit::WindowImplUIKit(WindowHandle /* handle */) @@ -238,6 +236,4 @@ void WindowImplUIKit::setVirtualKeyboardVisible(bool visible) [m_view resignFirstResponder]; } -} // namespace priv - -} // namespace sf +} // namespace sf::priv