1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Add namespace closing comments

This commit is contained in:
Hielke Morsink
2018-05-04 22:40:09 +02:00
parent bc44792da9
commit 8d10bfb5a1
70 changed files with 82 additions and 83 deletions

View File

@@ -385,6 +385,6 @@ namespace OpenRCT2::Ui
{
return new LinuxContext();
}
}
} // namespace OpenRCT2::Ui
#endif // __linux__ || __OpenBSD__

View File

@@ -224,6 +224,6 @@ namespace OpenRCT2::Ui
{
return new Win32Context();
}
}
} // namespace OpenRCT2::Ui
#endif // _WIN32

View File

@@ -47,5 +47,5 @@ namespace OpenRCT2
IPlatformUiContext * CreatePlatformUiContext();
InGameConsole& GetInGameConsole();
}
}
} // namespace Ui
} // namespace OpenRCT2

View File

@@ -182,6 +182,6 @@ namespace OpenRCT2::Ui
{
return new macOSContext();
}
}
} // namespace OpenRCT2::Ui
#endif // __APPLE__ && __MACH__

View File

@@ -295,4 +295,4 @@ namespace OpenRCT2::Audio
{
return new (std::nothrow) AudioChannelImpl();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -98,4 +98,4 @@ namespace OpenRCT2::Audio
{
return new AudioContext();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -70,4 +70,4 @@ namespace OpenRCT2::Audio
}
IAudioContext * CreateAudioContext();
}
} // namespace OpenRCT2::Audio

View File

@@ -53,4 +53,4 @@ namespace OpenRCT2::Audio
{
return !(lhs == rhs);
}
}
} // namespace OpenRCT2::Audio

View File

@@ -513,4 +513,4 @@ namespace OpenRCT2::Audio
{
return new AudioMixerImpl();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -207,4 +207,4 @@ namespace OpenRCT2::Audio
}
return source;
}
}
} // namespace OpenRCT2::Audio

View File

@@ -243,4 +243,4 @@ namespace OpenRCT2::Audio
}
return source;
}
}
} // namespace OpenRCT2::Audio

View File

@@ -836,6 +836,6 @@ namespace
shortcut_view_clipping,
shortcut_highlight_path_issues_toggle,
};
}
} // anonymous namespace
#pragma endregion

View File

@@ -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;

View File

@@ -53,4 +53,4 @@ namespace OpenRCT2::Ui
void Invalidate() const;
sint32 GetNumVisibleLines() const;
};
}
} // namespace OpenRCT2::Ui

View File

@@ -114,7 +114,7 @@ namespace OpenRCT2
IContext * CreateContext();
IContext * CreateContext(IPlatformEnvironment * env, Audio::IAudioContext * audioContext, Ui::IUiContext * uiContext);
IContext * GetContext();
}
} // namespace OpenRCT2
enum
{

View File

@@ -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
{

View File

@@ -84,4 +84,4 @@ namespace OpenRCT2
IPlatformEnvironment * CreatePlatformEnvironment(DIRBASE_VALUES basePaths);
IPlatformEnvironment * CreatePlatformEnvironment();
}
} // namespace OpenRCT2

View File

@@ -235,4 +235,4 @@ namespace GameActions
}
return result;
}
}
} // namespace GameActions

View File

@@ -252,4 +252,4 @@ namespace GameActions
Register(T::TYPE, factory);
return factory;
}
}
} // namespace GameActions

View File

@@ -55,4 +55,4 @@ namespace GameActions
Register<ParkSetNameAction>();
Register<BannerSetNameAction>();
}
}
} // namespace GameActions

View File

@@ -73,4 +73,4 @@ namespace OpenRCT2::Audio
virtual size_t Read(void * dst, size_t len) abstract;
};
}
} // namespace OpenRCT2::Audio

View File

@@ -60,4 +60,4 @@ namespace OpenRCT2::Audio
};
IAudioContext * CreateDummyAudioContext();
}
} // namespace OpenRCT2::Audio

View File

@@ -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

View File

@@ -37,4 +37,4 @@ namespace OpenRCT2::Audio
{
IAudioSource * CreateNull();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -49,4 +49,4 @@ namespace OpenRCT2::Audio
{
return new DummyAudioContext();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -39,4 +39,4 @@ namespace OpenRCT2::Audio
{
return new NullAudioSource();
}
}
} // namespace OpenRCT2::Audio

View File

@@ -550,7 +550,7 @@ namespace CommandLine
}
return nullptr;
}
}
} // namespace CommandLine
sint32 cmdline_run(const char * * argv, sint32 argc)
{

View File

@@ -108,4 +108,4 @@ namespace CommandLine
exitcode_t HandleCommandConvert(CommandLineArgEnumerator * enumerator);
exitcode_t HandleCommandUri(CommandLineArgEnumerator * enumerator);
}
} // namespace CommandLine

View File

@@ -645,7 +645,7 @@ namespace Config
}
return std::string();
}
}
} // namespace Config
GeneralConfiguration gConfigGeneral;
InterfaceConfiguration gConfigInterface;

View File

@@ -114,4 +114,4 @@ namespace Collections
}
#pragma endregion
}
} // namespace Collections

View File

@@ -101,5 +101,5 @@ namespace Console
auto formatLn = std::string(format) + "\n";
vfprintf(stdout, formatLn.c_str(), args);
}
}
}
} // namespace Error
} // namespace Console

View File

@@ -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

View File

@@ -34,4 +34,4 @@ namespace Debug
#endif
#endif
}
}
} // namespace Debug

View File

@@ -132,7 +132,7 @@ namespace File
#endif
return lastModified;
}
}
} // namespace File
bool readentirefile(const utf8 * path, void * * outBuffer, size_t * outLength)
{

View File

@@ -30,4 +30,4 @@ namespace File
void WriteAllBytes(const std::string &path, const void * buffer, size_t length);
std::vector<std::string> ReadAllLines(const std::string &path);
uint64 GetLastModified(const std::string &path);
}
} // namespace File

View File

@@ -67,4 +67,4 @@ namespace Path
void QueryDirectory(QueryDirectoryResult * result, const std::string &pattern);
std::vector<std::string> GetDirectories(const std::string &path);
}
} // namespace Path

View File

@@ -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

View File

@@ -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__

View File

@@ -58,4 +58,4 @@ namespace Json
size_t jsonOutputSize = String::SizeOf(jsonOutput);
fs.Write(jsonOutput, jsonOutputSize);
}
}
} // namespace Json

View File

@@ -48,4 +48,4 @@ namespace Math
if (x > 0) return 1;
return 0;
}
}
} // namespace Math

View File

@@ -98,4 +98,4 @@ namespace Memory
}
Free(ptr);
}
}
} // namespace Memory

View File

@@ -274,4 +274,4 @@ namespace Path
#endif
return result;
}
}
} // namespace Path

View File

@@ -54,4 +54,4 @@ namespace Path
* Note: This will not resolve the case for Windows.
*/
std::string ResolveCasing(const std::string &path);
}
} // namespace Path

View File

@@ -561,4 +561,4 @@ namespace String
return std::string(src);
#endif
}
}
} // namespace String

View File

@@ -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

View File

@@ -158,6 +158,6 @@ namespace Zip
}
return result;
}
}
} // namespace Zip
# endif

View File

@@ -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

View File

@@ -80,4 +80,4 @@ namespace OpenRCT2::Drawing
sint32 xStart,
sint32 yStart) abstract;
};
}
} // namespace OpenRCT2::Drawing

View File

@@ -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

View File

@@ -65,4 +65,4 @@ namespace OpenRCT2::Ui
uint8 Data[CURSOR_BIT_WIDTH * CURSOR_HEIGHT];
uint8 Mask[CURSOR_BIT_WIDTH * CURSOR_HEIGHT];
};
}
} // namespace OpenRCT2::Ui

View File

@@ -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()
{

View File

@@ -624,4 +624,4 @@ namespace LanguagePackFactory
auto languagePack = LanguagePack::FromText(id, text);
return languagePack;
}
}
} // namespace LanguagePackFactory

View File

@@ -533,6 +533,6 @@ namespace Convert
{
return ntohs(value);
}
}
} // namespace Convert
#endif

View File

@@ -554,7 +554,7 @@ namespace Twitch
news_item_add_to_queue_raw(NEWS_ITEM_BLANK, buffer, 0);
}
}
}
} // namespace Twitch
void twitch_update()
{

View File

@@ -276,4 +276,4 @@ namespace ObjectFactory
}
return result;
}
}
} // namespace ObjectFactory

View File

@@ -371,4 +371,4 @@ namespace ObjectJsonHelpers
}
}
}
}
} // namespace ObjectJsonHelpers

View File

@@ -54,4 +54,4 @@ namespace ObjectJsonHelpers
}
return flags;
}
};
} // namespace ObjectJsonHelpers

View File

@@ -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

View File

@@ -304,6 +304,6 @@ namespace Platform
while (size >= wExePathCapacity);
return String::ToUtf8(wExePath.get());
}
}
} // namespace Platform
#endif

View File

@@ -46,4 +46,4 @@ namespace Platform
std::string FormatTime(std::time_t timestamp);
bool IsColourTerminalSupported();
}
} // namespace Platform

View File

@@ -1427,5 +1427,5 @@ namespace RCT1
};
return map[sceneryType];
}
}
} // namespace RCT1
// clang-format on

View File

@@ -48,4 +48,4 @@ namespace RCT1
const char * GetWaterObject(uint8 waterType);
const std::vector<const char *> GetSceneryObjects(uint8 sceneryType);
}
} // namespace RCT1

View File

@@ -63,4 +63,4 @@ namespace SawyerEncoding
return false;
}
}
}
} // namespace SawyerEncoding

View File

@@ -419,7 +419,7 @@ namespace ScenarioSources
}
}
}
}
} // namespace ScenarioSources
bool scenario_get_source_desc(const utf8 * name, source_desc * outDesc)
{

View File

@@ -312,7 +312,7 @@ namespace TitleSequenceManager
}
return false;
}
}
} // namespace TitleSequenceManager
size_t title_sequence_manager_get_count()
{

View File

@@ -96,4 +96,4 @@ namespace OpenRCT2::Ui
{
return new DummyUiContext();
}
}
} // namespace OpenRCT2::Ui

View File

@@ -38,4 +38,4 @@ namespace OpenRCT2::Ui
{
return new DummyWindowManager();
}
}
} // namespace OpenRCT2::Ui

View File

@@ -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

View File

@@ -45,4 +45,4 @@ namespace OpenRCT2::Ui
};
IWindowManager * CreateDummyWindowManager();
}
} // namespace OpenRCT2::Ui

View File

@@ -13,4 +13,4 @@ namespace TestData
std::string path = Path::Combine(GetBasePath(), "parks", name);
return path;
}
};
} // namespace TestData