Skip to content

Commit

Permalink
Log Nlohmann version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Mar 18, 2024
1 parent 1150e2d commit 6a5a473
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dedicatedserver/dedicatedservermain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ try
}
logMAXRVersion();
logSDLVersions();
logNlohmannVersion();
CR_INIT_CRASHREPORTING();

SDLComponent sdlComponent (false);
Expand Down
12 changes: 12 additions & 0 deletions src/lib/maxrversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "utility/log.h"

#include <nlohmann/json.hpp>

//------------------------------------------------------------------------------
void logMAXRVersion()
{
Expand All @@ -33,3 +35,13 @@ void logMAXRVersion()
NetLog.debug (sVersion);
NetLog.debug (sBuild);
}

//------------------------------------------------------------------------------
void logNlohmannVersion()
{
const auto version = "nlohmann json v"
+ std::to_string (NLOHMANN_JSON_VERSION_MAJOR) + "."
+ std::to_string (NLOHMANN_JSON_VERSION_MINOR) + "."
+ std::to_string (NLOHMANN_JSON_VERSION_PATCH);
Log.info (version);
}
3 changes: 3 additions & 0 deletions src/lib/maxrversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@

void logMAXRVersion();

// Dependencies
void logNlohmannVersion();

#endif
1 change: 1 addition & 0 deletions src/ui/uimain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ try
is_main_thread();
logMAXRVersion();
logSDLVersions();
logNlohmannVersion();
CR_INIT_CRASHREPORTING();

SDLComponent sdlComponent (true);
Expand Down

0 comments on commit 6a5a473

Please sign in to comment.