Skip to content

Commit f7c058f

Browse files
committed
use default arguments instead of duplicated functions
1 parent d0ce873 commit f7c058f

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

include/GameAnalytics/GameAnalytics.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,9 @@ namespace gameanalytics
138138
static bool isThreadEnding();
139139

140140
private:
141-
static bool _endThread;
142141

143-
static bool isSdkReady(bool needsInitialized);
144-
static bool isSdkReady(bool needsInitialized, bool warn);
145-
static bool isSdkReady(bool needsInitialized, bool warn, std::string const& message);
142+
static bool _endThread;
143+
static bool isSdkReady(bool needsInitialized, bool warn = true, std::string const& message = "");
146144
};
147145

148146
} // namespace gameanalytics

source/gameanalytics/GameAnalytics.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -956,18 +956,6 @@ namespace gameanalytics
956956
return _endThread || threading::GAThreading::isThreadFinished();
957957
}
958958

959-
// --------------PRIVATE HELPERS -------------- //
960-
961-
bool GameAnalytics::isSdkReady(bool needsInitialized)
962-
{
963-
return isSdkReady(needsInitialized, true);
964-
}
965-
966-
bool GameAnalytics::isSdkReady(bool needsInitialized, bool warn)
967-
{
968-
return isSdkReady(needsInitialized, warn, "");
969-
}
970-
971959
bool GameAnalytics::isSdkReady(bool needsInitialized, bool warn, std::string const& message)
972960
{
973961
constexpr std::size_t maxMsgLen = 64u;

0 commit comments

Comments
 (0)