1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Mark constructors explicit (#6928)

This commit is contained in:
Michał Janiszewski
2018-01-04 02:12:34 +01:00
committed by Ted John
parent 7aeb3e11b3
commit 4d0c88fb94
7 changed files with 9 additions and 9 deletions

View File

@@ -87,7 +87,7 @@ private:
float _gestureRadius = 0;
public:
UiContext(IPlatformEnvironment * env)
explicit UiContext(IPlatformEnvironment * env)
: _platformUiContext(CreatePlatformUiContext()),
_windowManager(CreateWindowManager()),
_keyboardShortcuts(env)

View File

@@ -149,7 +149,7 @@ public:
SDL_Color Palette[256];
vec4 GLPalette[256];
OpenGLDrawingEngine(IUiContext * uiContext)
explicit OpenGLDrawingEngine(IUiContext * uiContext)
: _uiContext(uiContext)
{
_window = (SDL_Window *)_uiContext->GetWindow();

View File

@@ -34,7 +34,7 @@ private:
std::string _basePath[DIRBASE_COUNT];
public:
PlatformEnvironment(DIRBASE_VALUES basePaths)
explicit PlatformEnvironment(DIRBASE_VALUES basePaths)
{
for (sint32 i = 0; i < DIRBASE_COUNT; i++)
{

View File

@@ -100,7 +100,7 @@ private:
std::unordered_map<std::string, std::string, StringIHash, StringICmp> _values;
public:
IniReader(IStream * stream)
explicit IniReader(IStream * stream)
{
uint64 length = stream->GetLength() - stream->GetPosition();
_buffer.resize(length);

View File

@@ -27,7 +27,7 @@ private:
bool _firstSection = true;
public:
IniWriter(IStream * stream)
explicit IniWriter(IStream * stream)
: _stream(stream)
{
}

View File

@@ -83,7 +83,7 @@ private:
static constexpr auto PATTERN = "*.dat;*.pob";
public:
ObjectFileIndex(IPlatformEnvironment * env) :
explicit ObjectFileIndex(IPlatformEnvironment * env) :
FileIndex("object index",
MAGIC_NUMBER,
VERSION,
@@ -195,7 +195,7 @@ class ObjectRepository final : public IObjectRepository
ObjectEntryMap _itemMap;
public:
ObjectRepository(IPlatformEnvironment * env)
explicit ObjectRepository(IPlatformEnvironment * env)
: _env(env),
_fileIndex(env)
{

View File

@@ -127,7 +127,7 @@ private:
static constexpr auto PATTERN = "*.sc4;*.sc6";
public:
ScenarioFileIndex(IPlatformEnvironment * env) :
explicit ScenarioFileIndex(IPlatformEnvironment * env) :
FileIndex("scenario index",
MAGIC_NUMBER,
VERSION,
@@ -325,7 +325,7 @@ private:
std::vector<scenario_highscore_entry*> _highscores;
public:
ScenarioRepository(IPlatformEnvironment * env)
explicit ScenarioRepository(IPlatformEnvironment * env)
: _env(env),
_fileIndex(env)
{