mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-26 08:01:51 +08:00
rename function names related to versions.
The current function name is quite generic and it's easy to conflict with other functions in a project since they're C functions
This commit is contained in:
parent
a3723894c2
commit
36eb9a0d91
@ -670,19 +670,19 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint8_t versionMajor();
|
||||
PROFILER_API uint8_t apiVersionMajor();
|
||||
|
||||
/** Returns current minor version.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint8_t versionMinor();
|
||||
PROFILER_API uint8_t apiVersionMinor();
|
||||
|
||||
/** Returns current version patch.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint16_t versionPatch();
|
||||
PROFILER_API uint16_t apiVersionPatch();
|
||||
|
||||
/** Returns current version in 32-bit integer format.
|
||||
|
||||
@ -691,7 +691,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint32_t version();
|
||||
PROFILER_API uint32_t apiVersion();
|
||||
|
||||
/** Returns current version string.
|
||||
|
||||
@ -699,7 +699,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API const char* versionName();
|
||||
PROFILER_API const char* apiVersionName();
|
||||
|
||||
/** Returns true if current thread has been marked as Main.
|
||||
Otherwise, returns false.
|
||||
@ -790,11 +790,11 @@ namespace profiler {
|
||||
inline void startListen(uint16_t = ::profiler::DEFAULT_PORT) { }
|
||||
inline void stopListen() { }
|
||||
inline EASY_CONSTEXPR_FCN bool isListening() { return false; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t versionMajor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t versionMinor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint16_t versionPatch() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint32_t version() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN const char* versionName() { return "v0.0.0_disabled"; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t apiVersionMajor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t apiVersionMinor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint16_t apiVersionPatch() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint32_t apiVersion() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN const char* apiVersionName() { return "v0.0.0_disabled"; }
|
||||
inline EASY_CONSTEXPR_FCN bool isMainThread() { return false; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t this_thread_frameTime(Duration = ::profiler::MICROSECONDS) { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t this_thread_frameTimeLocalMax(Duration = ::profiler::MICROSECONDS) { return 0; }
|
||||
|
@ -85,7 +85,7 @@ extern const uint32_t EASY_PROFILER_VERSION = (static_cast<uint32_t>(EASY_PROFIL
|
||||
|
||||
extern "C" {
|
||||
|
||||
PROFILER_API uint8_t versionMajor()
|
||||
PROFILER_API uint8_t apiVersionMajor()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_MAJOR && EASY_PROFILER_VERSION_MAJOR <= 255,
|
||||
"EASY_PROFILER_VERSION_MAJOR must be defined in range [0, 255]");
|
||||
@ -93,7 +93,7 @@ PROFILER_API uint8_t versionMajor()
|
||||
return EASY_PROFILER_VERSION_MAJOR;
|
||||
}
|
||||
|
||||
PROFILER_API uint8_t versionMinor()
|
||||
PROFILER_API uint8_t apiVersionMinor()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_MINOR && EASY_PROFILER_VERSION_MINOR <= 255,
|
||||
"EASY_PROFILER_VERSION_MINOR must be defined in range [0, 255]");
|
||||
@ -101,7 +101,7 @@ PROFILER_API uint8_t versionMinor()
|
||||
return EASY_PROFILER_VERSION_MINOR;
|
||||
}
|
||||
|
||||
PROFILER_API uint16_t versionPatch()
|
||||
PROFILER_API uint16_t apiVersionPatch()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_PATCH && EASY_PROFILER_VERSION_PATCH <= 65535,
|
||||
"EASY_PROFILER_VERSION_PATCH must be defined in range [0, 65535]");
|
||||
@ -109,12 +109,12 @@ PROFILER_API uint16_t versionPatch()
|
||||
return EASY_PROFILER_VERSION_PATCH;
|
||||
}
|
||||
|
||||
PROFILER_API uint32_t version()
|
||||
PROFILER_API uint32_t apiVersion()
|
||||
{
|
||||
return EASY_PROFILER_VERSION;
|
||||
}
|
||||
|
||||
PROFILER_API const char* versionName()
|
||||
PROFILER_API const char* apiVersionName()
|
||||
{
|
||||
#ifdef EASY_PROFILER_API_DISABLED
|
||||
return EASY_PROFILER_PRODUCT_VERSION "_disabled";
|
||||
|
Loading…
x
Reference in New Issue
Block a user