From 8d10bfb5a12682b94f609eae99037e2e390d65ea Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Fri, 4 May 2018 22:40:09 +0200 Subject: [PATCH] Add namespace closing comments --- src/openrct2-ui/UiContext.Linux.cpp | 2 +- src/openrct2-ui/UiContext.Win32.cpp | 2 +- src/openrct2-ui/UiContext.h | 4 ++-- src/openrct2-ui/UiContext.macOS.mm | 2 +- src/openrct2-ui/audio/AudioChannel.cpp | 2 +- src/openrct2-ui/audio/AudioContext.cpp | 2 +- src/openrct2-ui/audio/AudioContext.h | 2 +- src/openrct2-ui/audio/AudioFormat.h | 2 +- src/openrct2-ui/audio/AudioMixer.cpp | 2 +- src/openrct2-ui/audio/FileAudioSource.cpp | 2 +- src/openrct2-ui/audio/MemoryAudioSource.cpp | 2 +- src/openrct2-ui/input/KeyboardShortcut.cpp | 2 +- src/openrct2-ui/input/KeyboardShortcuts.h | 4 ++-- src/openrct2-ui/interface/InGameConsole.h | 2 +- src/openrct2/Context.h | 2 +- src/openrct2/Editor.h | 2 +- src/openrct2/PlatformEnvironment.h | 2 +- src/openrct2/actions/GameAction.cpp | 2 +- src/openrct2/actions/GameAction.h | 2 +- src/openrct2/actions/GameActionRegistration.cpp | 2 +- src/openrct2/audio/AudioChannel.h | 2 +- src/openrct2/audio/AudioContext.h | 2 +- src/openrct2/audio/AudioMixer.h | 2 +- src/openrct2/audio/AudioSource.h | 2 +- src/openrct2/audio/DummyAudioContext.cpp | 2 +- src/openrct2/audio/NullAudioSource.cpp | 2 +- src/openrct2/cmdline/CommandLine.cpp | 2 +- src/openrct2/cmdline/CommandLine.hpp | 2 +- src/openrct2/config/Config.cpp | 2 +- src/openrct2/core/Collections.hpp | 2 +- src/openrct2/core/Console.cpp | 4 ++-- src/openrct2/core/Console.hpp | 4 ++-- src/openrct2/core/Diagnostics.cpp | 2 +- src/openrct2/core/File.cpp | 2 +- src/openrct2/core/File.h | 2 +- src/openrct2/core/FileScanner.h | 2 +- src/openrct2/core/Guard.cpp | 3 +-- src/openrct2/core/Guard.hpp | 2 +- src/openrct2/core/Json.cpp | 2 +- src/openrct2/core/Math.hpp | 2 +- src/openrct2/core/Memory.hpp | 2 +- src/openrct2/core/Path.cpp | 2 +- src/openrct2/core/Path.hpp | 2 +- src/openrct2/core/String.cpp | 2 +- src/openrct2/core/String.hpp | 4 ++-- src/openrct2/core/Zip.cpp | 2 +- src/openrct2/drawing/IDrawingContext.h | 2 +- src/openrct2/drawing/IDrawingEngine.h | 2 +- src/openrct2/drawing/X8DrawingEngine.h | 6 +++--- src/openrct2/interface/Cursors.h | 2 +- src/openrct2/interface/Theme.cpp | 2 +- src/openrct2/localisation/LanguagePack.cpp | 2 +- src/openrct2/network/TcpSocket.cpp | 2 +- src/openrct2/network/Twitch.cpp | 2 +- src/openrct2/object/ObjectFactory.cpp | 2 +- src/openrct2/object/ObjectJsonHelpers.cpp | 2 +- src/openrct2/object/ObjectJsonHelpers.h | 2 +- src/openrct2/paint/Painter.h | 8 ++++---- src/openrct2/platform/Platform.Win32.cpp | 2 +- src/openrct2/platform/Platform2.h | 2 +- src/openrct2/rct1/Tables.cpp | 2 +- src/openrct2/rct1/Tables.h | 2 +- src/openrct2/rct12/SawyerEncoding.cpp | 2 +- src/openrct2/scenario/ScenarioSources.cpp | 2 +- src/openrct2/title/TitleSequenceManager.cpp | 2 +- src/openrct2/ui/DummyUiContext.cpp | 2 +- src/openrct2/ui/DummyWindowManager.cpp | 2 +- src/openrct2/ui/UiContext.h | 6 +++--- src/openrct2/ui/WindowManager.h | 2 +- test/tests/TestData.cpp | 2 +- 70 files changed, 82 insertions(+), 83 deletions(-) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 6859460ba7..8d9fa7cd1a 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -385,6 +385,6 @@ namespace OpenRCT2::Ui { return new LinuxContext(); } -} +} // namespace OpenRCT2::Ui #endif // __linux__ || __OpenBSD__ diff --git a/src/openrct2-ui/UiContext.Win32.cpp b/src/openrct2-ui/UiContext.Win32.cpp index 5e8a35cb36..cef820f895 100644 --- a/src/openrct2-ui/UiContext.Win32.cpp +++ b/src/openrct2-ui/UiContext.Win32.cpp @@ -224,6 +224,6 @@ namespace OpenRCT2::Ui { return new Win32Context(); } -} +} // namespace OpenRCT2::Ui #endif // _WIN32 diff --git a/src/openrct2-ui/UiContext.h b/src/openrct2-ui/UiContext.h index a005151f11..0f879e0e8a 100644 --- a/src/openrct2-ui/UiContext.h +++ b/src/openrct2-ui/UiContext.h @@ -47,5 +47,5 @@ namespace OpenRCT2 IPlatformUiContext * CreatePlatformUiContext(); InGameConsole& GetInGameConsole(); - } -} + } // namespace Ui +} // namespace OpenRCT2 diff --git a/src/openrct2-ui/UiContext.macOS.mm b/src/openrct2-ui/UiContext.macOS.mm index b67b9b7296..1d0b424a5b 100644 --- a/src/openrct2-ui/UiContext.macOS.mm +++ b/src/openrct2-ui/UiContext.macOS.mm @@ -182,6 +182,6 @@ namespace OpenRCT2::Ui { return new macOSContext(); } -} +} // namespace OpenRCT2::Ui #endif // __APPLE__ && __MACH__ diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp index bbcef49102..33a02801ee 100644 --- a/src/openrct2-ui/audio/AudioChannel.cpp +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -295,4 +295,4 @@ namespace OpenRCT2::Audio { return new (std::nothrow) AudioChannelImpl(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/AudioContext.cpp b/src/openrct2-ui/audio/AudioContext.cpp index 9bf456936c..f5c0616a2a 100644 --- a/src/openrct2-ui/audio/AudioContext.cpp +++ b/src/openrct2-ui/audio/AudioContext.cpp @@ -98,4 +98,4 @@ namespace OpenRCT2::Audio { return new AudioContext(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/AudioContext.h b/src/openrct2-ui/audio/AudioContext.h index d6c4b41c47..3a04fe6381 100644 --- a/src/openrct2-ui/audio/AudioContext.h +++ b/src/openrct2-ui/audio/AudioContext.h @@ -70,4 +70,4 @@ namespace OpenRCT2::Audio } IAudioContext * CreateAudioContext(); -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/AudioFormat.h b/src/openrct2-ui/audio/AudioFormat.h index 2d21c3d21f..6d951b28b5 100644 --- a/src/openrct2-ui/audio/AudioFormat.h +++ b/src/openrct2-ui/audio/AudioFormat.h @@ -53,4 +53,4 @@ namespace OpenRCT2::Audio { return !(lhs == rhs); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index 4b291840b8..a6486b90fb 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -513,4 +513,4 @@ namespace OpenRCT2::Audio { return new AudioMixerImpl(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/FileAudioSource.cpp b/src/openrct2-ui/audio/FileAudioSource.cpp index 3308b8c0e4..a0716e4296 100644 --- a/src/openrct2-ui/audio/FileAudioSource.cpp +++ b/src/openrct2-ui/audio/FileAudioSource.cpp @@ -207,4 +207,4 @@ namespace OpenRCT2::Audio } return source; } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/audio/MemoryAudioSource.cpp b/src/openrct2-ui/audio/MemoryAudioSource.cpp index 6da59002ab..acbd035c2b 100644 --- a/src/openrct2-ui/audio/MemoryAudioSource.cpp +++ b/src/openrct2-ui/audio/MemoryAudioSource.cpp @@ -243,4 +243,4 @@ namespace OpenRCT2::Audio } return source; } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2-ui/input/KeyboardShortcut.cpp b/src/openrct2-ui/input/KeyboardShortcut.cpp index a483c476b1..42229781a1 100644 --- a/src/openrct2-ui/input/KeyboardShortcut.cpp +++ b/src/openrct2-ui/input/KeyboardShortcut.cpp @@ -836,6 +836,6 @@ namespace shortcut_view_clipping, shortcut_highlight_path_issues_toggle, }; -} +} // anonymous namespace #pragma endregion diff --git a/src/openrct2-ui/input/KeyboardShortcuts.h b/src/openrct2-ui/input/KeyboardShortcuts.h index f66049a486..28c9482bf3 100644 --- a/src/openrct2-ui/input/KeyboardShortcuts.h +++ b/src/openrct2-ui/input/KeyboardShortcuts.h @@ -135,8 +135,8 @@ namespace OpenRCT2 sint32 GetFromKey(sint32 key); void GetKeyboardMapScroll(const uint8 * keysState, sint32 * x, sint32 * y) const; }; - } -} + } // namespace Input +} // namespace OpenRCT2 /** The current shortcut being changed. */ extern uint8 gKeyboardShortcutChangeId; diff --git a/src/openrct2-ui/interface/InGameConsole.h b/src/openrct2-ui/interface/InGameConsole.h index b67762a0eb..221e49d161 100644 --- a/src/openrct2-ui/interface/InGameConsole.h +++ b/src/openrct2-ui/interface/InGameConsole.h @@ -53,4 +53,4 @@ namespace OpenRCT2::Ui void Invalidate() const; sint32 GetNumVisibleLines() const; }; -} +} // namespace OpenRCT2::Ui diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 74b79e0e14..9d9bc1b2e9 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -114,7 +114,7 @@ namespace OpenRCT2 IContext * CreateContext(); IContext * CreateContext(IPlatformEnvironment * env, Audio::IAudioContext * audioContext, Ui::IUiContext * uiContext); IContext * GetContext(); -} +} // namespace OpenRCT2 enum { diff --git a/src/openrct2/Editor.h b/src/openrct2/Editor.h index dee4af90fc..d636b6a35c 100644 --- a/src/openrct2/Editor.h +++ b/src/openrct2/Editor.h @@ -36,7 +36,7 @@ namespace Editor uint8 GetSelectedObjectFlags(sint32 objectType, size_t index); void ClearSelectedObject(sint32 objectType, size_t index, uint32 flags); void SetSelectedObject(sint32 objectType, size_t index, uint32 flags); -} +} // namespace Editor enum RCT2_EDITOR_STEP { diff --git a/src/openrct2/PlatformEnvironment.h b/src/openrct2/PlatformEnvironment.h index 83f9c27372..36223a4694 100644 --- a/src/openrct2/PlatformEnvironment.h +++ b/src/openrct2/PlatformEnvironment.h @@ -84,4 +84,4 @@ namespace OpenRCT2 IPlatformEnvironment * CreatePlatformEnvironment(DIRBASE_VALUES basePaths); IPlatformEnvironment * CreatePlatformEnvironment(); -} +} // namespace OpenRCT2 diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index d9e01d6828..7c31595c1b 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -235,4 +235,4 @@ namespace GameActions } return result; } -} +} // namespace GameActions diff --git a/src/openrct2/actions/GameAction.h b/src/openrct2/actions/GameAction.h index ede4fa27a7..4e14f9d717 100644 --- a/src/openrct2/actions/GameAction.h +++ b/src/openrct2/actions/GameAction.h @@ -252,4 +252,4 @@ namespace GameActions Register(T::TYPE, factory); return factory; } -} +} // namespace GameActions diff --git a/src/openrct2/actions/GameActionRegistration.cpp b/src/openrct2/actions/GameActionRegistration.cpp index d037884b37..7d6f18fc57 100644 --- a/src/openrct2/actions/GameActionRegistration.cpp +++ b/src/openrct2/actions/GameActionRegistration.cpp @@ -55,4 +55,4 @@ namespace GameActions Register(); Register(); } -} +} // namespace GameActions diff --git a/src/openrct2/audio/AudioChannel.h b/src/openrct2/audio/AudioChannel.h index 622e4e5b89..ebf522e071 100644 --- a/src/openrct2/audio/AudioChannel.h +++ b/src/openrct2/audio/AudioChannel.h @@ -73,4 +73,4 @@ namespace OpenRCT2::Audio virtual size_t Read(void * dst, size_t len) abstract; }; -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2/audio/AudioContext.h b/src/openrct2/audio/AudioContext.h index efc2387cd0..fc6a00f75b 100644 --- a/src/openrct2/audio/AudioContext.h +++ b/src/openrct2/audio/AudioContext.h @@ -60,4 +60,4 @@ namespace OpenRCT2::Audio }; IAudioContext * CreateDummyAudioContext(); -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2/audio/AudioMixer.h b/src/openrct2/audio/AudioMixer.h index 5784f8fdd3..116a153494 100644 --- a/src/openrct2/audio/AudioMixer.h +++ b/src/openrct2/audio/AudioMixer.h @@ -53,7 +53,7 @@ namespace OpenRCT2::Audio virtual IAudioSource * GetSoundSource(sint32 id) abstract; virtual IAudioSource * GetMusicSource(sint32 id) abstract; }; -} +} // namespace OpenRCT2::Audio #ifndef DSBPAN_LEFT #define DSBPAN_LEFT -10000 diff --git a/src/openrct2/audio/AudioSource.h b/src/openrct2/audio/AudioSource.h index e23b6149c8..75081f809c 100644 --- a/src/openrct2/audio/AudioSource.h +++ b/src/openrct2/audio/AudioSource.h @@ -37,4 +37,4 @@ namespace OpenRCT2::Audio { IAudioSource * CreateNull(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2/audio/DummyAudioContext.cpp b/src/openrct2/audio/DummyAudioContext.cpp index b70454ef69..7161ae21e5 100644 --- a/src/openrct2/audio/DummyAudioContext.cpp +++ b/src/openrct2/audio/DummyAudioContext.cpp @@ -49,4 +49,4 @@ namespace OpenRCT2::Audio { return new DummyAudioContext(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2/audio/NullAudioSource.cpp b/src/openrct2/audio/NullAudioSource.cpp index e104fe2b45..9865fcf347 100644 --- a/src/openrct2/audio/NullAudioSource.cpp +++ b/src/openrct2/audio/NullAudioSource.cpp @@ -39,4 +39,4 @@ namespace OpenRCT2::Audio { return new NullAudioSource(); } -} +} // namespace OpenRCT2::Audio diff --git a/src/openrct2/cmdline/CommandLine.cpp b/src/openrct2/cmdline/CommandLine.cpp index c1ffc6e965..b569e65296 100644 --- a/src/openrct2/cmdline/CommandLine.cpp +++ b/src/openrct2/cmdline/CommandLine.cpp @@ -550,7 +550,7 @@ namespace CommandLine } return nullptr; } -} +} // namespace CommandLine sint32 cmdline_run(const char * * argv, sint32 argc) { diff --git a/src/openrct2/cmdline/CommandLine.hpp b/src/openrct2/cmdline/CommandLine.hpp index 20a6f6f496..2f7bdc77ea 100644 --- a/src/openrct2/cmdline/CommandLine.hpp +++ b/src/openrct2/cmdline/CommandLine.hpp @@ -108,4 +108,4 @@ namespace CommandLine exitcode_t HandleCommandConvert(CommandLineArgEnumerator * enumerator); exitcode_t HandleCommandUri(CommandLineArgEnumerator * enumerator); -} +} // namespace CommandLine diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index dfd257e51d..e09e6cf205 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -645,7 +645,7 @@ namespace Config } return std::string(); } -} +} // namespace Config GeneralConfiguration gConfigGeneral; InterfaceConfiguration gConfigInterface; diff --git a/src/openrct2/core/Collections.hpp b/src/openrct2/core/Collections.hpp index c80ab2d507..40b12051ba 100644 --- a/src/openrct2/core/Collections.hpp +++ b/src/openrct2/core/Collections.hpp @@ -114,4 +114,4 @@ namespace Collections } #pragma endregion -} +} // namespace Collections diff --git a/src/openrct2/core/Console.cpp b/src/openrct2/core/Console.cpp index 2bf9ebc72e..815461d00a 100644 --- a/src/openrct2/core/Console.cpp +++ b/src/openrct2/core/Console.cpp @@ -101,5 +101,5 @@ namespace Console auto formatLn = std::string(format) + "\n"; vfprintf(stdout, formatLn.c_str(), args); } - } -} + } // namespace Error +} // namespace Console diff --git a/src/openrct2/core/Console.hpp b/src/openrct2/core/Console.hpp index 7a397f6739..7f8b64a054 100644 --- a/src/openrct2/core/Console.hpp +++ b/src/openrct2/core/Console.hpp @@ -37,5 +37,5 @@ namespace Console void WriteLine(); void WriteLine(const utf8 * format, ...); void WriteLine_VA(const utf8 * format, va_list args); - } -} + } // namespace Error +} // namespace Console diff --git a/src/openrct2/core/Diagnostics.cpp b/src/openrct2/core/Diagnostics.cpp index c88d974bc3..bfbba37601 100644 --- a/src/openrct2/core/Diagnostics.cpp +++ b/src/openrct2/core/Diagnostics.cpp @@ -34,4 +34,4 @@ namespace Debug #endif #endif } -} +} // namespace Debug diff --git a/src/openrct2/core/File.cpp b/src/openrct2/core/File.cpp index 53b8a382a6..51d734edd7 100644 --- a/src/openrct2/core/File.cpp +++ b/src/openrct2/core/File.cpp @@ -132,7 +132,7 @@ namespace File #endif return lastModified; } -} +} // namespace File bool readentirefile(const utf8 * path, void * * outBuffer, size_t * outLength) { diff --git a/src/openrct2/core/File.h b/src/openrct2/core/File.h index 2084be8608..a58c460d84 100644 --- a/src/openrct2/core/File.h +++ b/src/openrct2/core/File.h @@ -30,4 +30,4 @@ namespace File void WriteAllBytes(const std::string &path, const void * buffer, size_t length); std::vector ReadAllLines(const std::string &path); uint64 GetLastModified(const std::string &path); -} +} // namespace File diff --git a/src/openrct2/core/FileScanner.h b/src/openrct2/core/FileScanner.h index 659360fc36..2530df074e 100644 --- a/src/openrct2/core/FileScanner.h +++ b/src/openrct2/core/FileScanner.h @@ -67,4 +67,4 @@ namespace Path void QueryDirectory(QueryDirectoryResult * result, const std::string &pattern); std::vector GetDirectories(const std::string &path); -} +} // namespace Path diff --git a/src/openrct2/core/Guard.cpp b/src/openrct2/core/Guard.cpp index e9a954a95d..65e4d6c034 100644 --- a/src/openrct2/core/Guard.cpp +++ b/src/openrct2/core/Guard.cpp @@ -38,7 +38,6 @@ void openrct2_assert_fwd(bool expression, const char * message, ...) va_end(va); } - namespace Guard { constexpr const utf8 * ASSERTION_MESSAGE = "An assertion failed, please report this to the OpenRCT2 developers."; @@ -156,4 +155,4 @@ namespace Guard #endif } #endif -} +} // namespace Guard diff --git a/src/openrct2/core/Guard.hpp b/src/openrct2/core/Guard.hpp index 24a3465fa4..eb127feb5e 100644 --- a/src/openrct2/core/Guard.hpp +++ b/src/openrct2/core/Guard.hpp @@ -60,6 +60,6 @@ namespace Guard Assert(argument >= min && argument <= max, message, args); va_end(args); } -} +} // namespace Guard #define GUARD_LINE "Location: %s:%d", __func__, __LINE__ diff --git a/src/openrct2/core/Json.cpp b/src/openrct2/core/Json.cpp index 93c4669edd..0ddf1730cb 100644 --- a/src/openrct2/core/Json.cpp +++ b/src/openrct2/core/Json.cpp @@ -58,4 +58,4 @@ namespace Json size_t jsonOutputSize = String::SizeOf(jsonOutput); fs.Write(jsonOutput, jsonOutputSize); } -} +} // namespace Json diff --git a/src/openrct2/core/Math.hpp b/src/openrct2/core/Math.hpp index 713cf3f1a8..20bbaa228c 100644 --- a/src/openrct2/core/Math.hpp +++ b/src/openrct2/core/Math.hpp @@ -48,4 +48,4 @@ namespace Math if (x > 0) return 1; return 0; } -} +} // namespace Math diff --git a/src/openrct2/core/Memory.hpp b/src/openrct2/core/Memory.hpp index b391093c4d..dd41c8a019 100644 --- a/src/openrct2/core/Memory.hpp +++ b/src/openrct2/core/Memory.hpp @@ -98,4 +98,4 @@ namespace Memory } Free(ptr); } -} +} // namespace Memory diff --git a/src/openrct2/core/Path.cpp b/src/openrct2/core/Path.cpp index c4198a5559..6ed23733d0 100644 --- a/src/openrct2/core/Path.cpp +++ b/src/openrct2/core/Path.cpp @@ -274,4 +274,4 @@ namespace Path #endif return result; } -} +} // namespace Path diff --git a/src/openrct2/core/Path.hpp b/src/openrct2/core/Path.hpp index c5986ba2a1..4d10609e32 100644 --- a/src/openrct2/core/Path.hpp +++ b/src/openrct2/core/Path.hpp @@ -54,4 +54,4 @@ namespace Path * Note: This will not resolve the case for Windows. */ std::string ResolveCasing(const std::string &path); -} +} // namespace Path diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index 11feeb696d..2e9ef839c0 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -561,4 +561,4 @@ namespace String return std::string(src); #endif } -} +} // namespace String diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index 49e534ba20..80d66578b7 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -33,7 +33,7 @@ namespace CODE_PAGE constexpr sint32 CP_950 = 950; // ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) constexpr sint32 CP_1252 = 1252; // ANSI Latin 1; Western European (Windows) constexpr sint32 CP_UTF8 = 65001; // Unicode (UTF-8) -} +} // namespace CODE_PAGE namespace String { @@ -110,4 +110,4 @@ namespace String * Converts a multi-byte string from one code page to another. */ std::string Convert(const std::string_view& src, sint32 srcCodePage, sint32 dstCodePage); -} +} // namespace String diff --git a/src/openrct2/core/Zip.cpp b/src/openrct2/core/Zip.cpp index b58e27f6b5..f97038b9cc 100644 --- a/src/openrct2/core/Zip.cpp +++ b/src/openrct2/core/Zip.cpp @@ -158,6 +158,6 @@ namespace Zip } return result; } -} +} // namespace Zip # endif diff --git a/src/openrct2/drawing/IDrawingContext.h b/src/openrct2/drawing/IDrawingContext.h index b768b1e64a..88c41584c1 100644 --- a/src/openrct2/drawing/IDrawingContext.h +++ b/src/openrct2/drawing/IDrawingContext.h @@ -39,4 +39,4 @@ namespace OpenRCT2::Drawing virtual void DrawSpriteSolid(uint32 image, sint32 x, sint32 y, uint8 colour) abstract; virtual void DrawGlyph(uint32 image, sint32 x, sint32 y, uint8 * palette) abstract; }; -} +} // namespace OpenRCT2::Drawing diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index 0784cdc429..448622967a 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -80,4 +80,4 @@ namespace OpenRCT2::Drawing sint32 xStart, sint32 yStart) abstract; }; -} +} // namespace OpenRCT2::Drawing diff --git a/src/openrct2/drawing/X8DrawingEngine.h b/src/openrct2/drawing/X8DrawingEngine.h index 2cc06c124a..2d6dd6d6a0 100644 --- a/src/openrct2/drawing/X8DrawingEngine.h +++ b/src/openrct2/drawing/X8DrawingEngine.h @@ -25,7 +25,7 @@ namespace OpenRCT2 namespace Ui { interface IUiContext; - } + } // namespace Ui namespace Drawing { @@ -149,5 +149,5 @@ namespace OpenRCT2 void SetDPI(rct_drawpixelinfo * dpi); }; - } -} + } // namespace Drawing +} // namespace OpenRCT2 diff --git a/src/openrct2/interface/Cursors.h b/src/openrct2/interface/Cursors.h index e9bf8211c8..c39f87e76a 100644 --- a/src/openrct2/interface/Cursors.h +++ b/src/openrct2/interface/Cursors.h @@ -65,4 +65,4 @@ namespace OpenRCT2::Ui uint8 Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; uint8 Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT]; }; -} +} // namespace OpenRCT2::Ui diff --git a/src/openrct2/interface/Theme.cpp b/src/openrct2/interface/Theme.cpp index 74aef9f8b4..99b257c087 100644 --- a/src/openrct2/interface/Theme.cpp +++ b/src/openrct2/interface/Theme.cpp @@ -657,7 +657,7 @@ namespace ThemeManager auto env = context->GetPlatformEnvironment(); return env->GetDirectoryPath(DIRBASE::USER, DIRID::THEME); } -} +} // namespace ThemeManager void theme_manager_load_available_themes() { diff --git a/src/openrct2/localisation/LanguagePack.cpp b/src/openrct2/localisation/LanguagePack.cpp index 517e894606..1ecdfdf696 100644 --- a/src/openrct2/localisation/LanguagePack.cpp +++ b/src/openrct2/localisation/LanguagePack.cpp @@ -624,4 +624,4 @@ namespace LanguagePackFactory auto languagePack = LanguagePack::FromText(id, text); return languagePack; } -} +} // namespace LanguagePackFactory diff --git a/src/openrct2/network/TcpSocket.cpp b/src/openrct2/network/TcpSocket.cpp index 9a133340d6..48cab68929 100644 --- a/src/openrct2/network/TcpSocket.cpp +++ b/src/openrct2/network/TcpSocket.cpp @@ -533,6 +533,6 @@ namespace Convert { return ntohs(value); } -} +} // namespace Convert #endif diff --git a/src/openrct2/network/Twitch.cpp b/src/openrct2/network/Twitch.cpp index 2580ca1318..c833bdaf7e 100644 --- a/src/openrct2/network/Twitch.cpp +++ b/src/openrct2/network/Twitch.cpp @@ -554,7 +554,7 @@ namespace Twitch news_item_add_to_queue_raw(NEWS_ITEM_BLANK, buffer, 0); } } -} +} // namespace Twitch void twitch_update() { diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index 8fcfdecf3d..7d99386e68 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -276,4 +276,4 @@ namespace ObjectFactory } return result; } -} +} // namespace ObjectFactory diff --git a/src/openrct2/object/ObjectJsonHelpers.cpp b/src/openrct2/object/ObjectJsonHelpers.cpp index 179245c6a3..6ff28aefa1 100644 --- a/src/openrct2/object/ObjectJsonHelpers.cpp +++ b/src/openrct2/object/ObjectJsonHelpers.cpp @@ -371,4 +371,4 @@ namespace ObjectJsonHelpers } } } -} +} // namespace ObjectJsonHelpers diff --git a/src/openrct2/object/ObjectJsonHelpers.h b/src/openrct2/object/ObjectJsonHelpers.h index 5f56a523bb..1958c98039 100644 --- a/src/openrct2/object/ObjectJsonHelpers.h +++ b/src/openrct2/object/ObjectJsonHelpers.h @@ -54,4 +54,4 @@ namespace ObjectJsonHelpers } return flags; } -}; +} // namespace ObjectJsonHelpers diff --git a/src/openrct2/paint/Painter.h b/src/openrct2/paint/Painter.h index ec4bbf37b2..a91f4f9bd4 100644 --- a/src/openrct2/paint/Painter.h +++ b/src/openrct2/paint/Painter.h @@ -26,12 +26,12 @@ namespace OpenRCT2 namespace Drawing { interface IDrawingEngine; - } + } // namespace Drawing namespace Ui { interface IUiContext; - } + } // namespace Ui namespace Paint { @@ -52,5 +52,5 @@ namespace OpenRCT2 void PaintFPS(rct_drawpixelinfo * dpi); void MeasureFPS(); }; - } -} + } // namespace Paint +} // namespace OpenRCT2 diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 4e71a8a606..e8334eab58 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -304,6 +304,6 @@ namespace Platform while (size >= wExePathCapacity); return String::ToUtf8(wExePath.get()); } -} +} // namespace Platform #endif diff --git a/src/openrct2/platform/Platform2.h b/src/openrct2/platform/Platform2.h index 35ae4450e7..b130580b6b 100644 --- a/src/openrct2/platform/Platform2.h +++ b/src/openrct2/platform/Platform2.h @@ -46,4 +46,4 @@ namespace Platform std::string FormatTime(std::time_t timestamp); bool IsColourTerminalSupported(); -} +} // namespace Platform diff --git a/src/openrct2/rct1/Tables.cpp b/src/openrct2/rct1/Tables.cpp index fea9f28ab7..7e356fb6d3 100644 --- a/src/openrct2/rct1/Tables.cpp +++ b/src/openrct2/rct1/Tables.cpp @@ -1427,5 +1427,5 @@ namespace RCT1 }; return map[sceneryType]; } -} +} // namespace RCT1 // clang-format on diff --git a/src/openrct2/rct1/Tables.h b/src/openrct2/rct1/Tables.h index 0b51643cfb..c4492a8d33 100644 --- a/src/openrct2/rct1/Tables.h +++ b/src/openrct2/rct1/Tables.h @@ -48,4 +48,4 @@ namespace RCT1 const char * GetWaterObject(uint8 waterType); const std::vector GetSceneryObjects(uint8 sceneryType); -} +} // namespace RCT1 diff --git a/src/openrct2/rct12/SawyerEncoding.cpp b/src/openrct2/rct12/SawyerEncoding.cpp index dda1ff6dfa..abde786577 100644 --- a/src/openrct2/rct12/SawyerEncoding.cpp +++ b/src/openrct2/rct12/SawyerEncoding.cpp @@ -63,4 +63,4 @@ namespace SawyerEncoding return false; } } -} +} // namespace SawyerEncoding diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index dafb046bd4..bf82d911db 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -419,7 +419,7 @@ namespace ScenarioSources } } } -} +} // namespace ScenarioSources bool scenario_get_source_desc(const utf8 * name, source_desc * outDesc) { diff --git a/src/openrct2/title/TitleSequenceManager.cpp b/src/openrct2/title/TitleSequenceManager.cpp index 9ca2beb36d..92c3828cc6 100644 --- a/src/openrct2/title/TitleSequenceManager.cpp +++ b/src/openrct2/title/TitleSequenceManager.cpp @@ -312,7 +312,7 @@ namespace TitleSequenceManager } return false; } -} +} // namespace TitleSequenceManager size_t title_sequence_manager_get_count() { diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index 9d0d844765..9d882d292c 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -96,4 +96,4 @@ namespace OpenRCT2::Ui { return new DummyUiContext(); } -} +} // namespace OpenRCT2::Ui diff --git a/src/openrct2/ui/DummyWindowManager.cpp b/src/openrct2/ui/DummyWindowManager.cpp index 661f56f489..e14980f78c 100644 --- a/src/openrct2/ui/DummyWindowManager.cpp +++ b/src/openrct2/ui/DummyWindowManager.cpp @@ -38,4 +38,4 @@ namespace OpenRCT2::Ui { return new DummyWindowManager(); } -} +} // namespace OpenRCT2::Ui diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index d44047ac59..a511f794f5 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -30,7 +30,7 @@ namespace OpenRCT2 { enum class DRAWING_ENGINE_TYPE; interface IDrawingEngine; - } + } // namespace Drawing namespace Ui { @@ -150,5 +150,5 @@ namespace OpenRCT2 }; IUiContext * CreateDummyUiContext(); - } -} + } // namespace Ui +} // namespace OpenRCT2 diff --git a/src/openrct2/ui/WindowManager.h b/src/openrct2/ui/WindowManager.h index edbb154087..89f3035963 100644 --- a/src/openrct2/ui/WindowManager.h +++ b/src/openrct2/ui/WindowManager.h @@ -45,4 +45,4 @@ namespace OpenRCT2::Ui }; IWindowManager * CreateDummyWindowManager(); -} +} // namespace OpenRCT2::Ui diff --git a/test/tests/TestData.cpp b/test/tests/TestData.cpp index 0ccfd8d1bf..7a6a150e0f 100644 --- a/test/tests/TestData.cpp +++ b/test/tests/TestData.cpp @@ -13,4 +13,4 @@ namespace TestData std::string path = Path::Combine(GetBasePath(), "parks", name); return path; } -}; +} // namespace TestData