Skip to content

Commit

Permalink
Move fmt baseline to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Aug 21, 2024
1 parent a582248 commit 29216bd
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion gframe/duelclient.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <algorithm>
#include "config.h"
#include <fmt/chrono.h>
#if EDOPRO_WINDOWS
#include <ws2tcpip.h>
#else
Expand Down
18 changes: 11 additions & 7 deletions gframe/fmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
#define FMT_UNICODE 0
#endif
#include <fmt/core.h>
static_assert(FMT_VERSION >= 50300, "Fmt 5.3.0 or greater is required");
static_assert(FMT_VERSION >= 50000, "Fmt 5.0.0 or greater is required");
#include <fmt/printf.h>
#if FMT_VERSION >= 80000
#if FMT_VERSION >= 80000 || FMT_VERSION < 50300
#include <utility> //std::forward
#include <fmt/xchar.h>

#include "compiler_features.h"

#define FMT_ADL_FUNCTION_NAME adapt_string_view
#define OVERRIDE_FMT(func) template<typename... Args>\
ForceInline decltype(auto) func(Args&&... args) {\
Expand All @@ -21,12 +20,17 @@ constexpr ForceInline const T& FMT_ADL_FUNCTION_NAME(const T& obj) {
return obj;
}
#else
#if FMT_VERSION < 60000
#include <fmt/time.h>
#endif
#define FMT_ADL_FUNCTION_NAME to_string_view
#define OVERRIDE_FMT(func) using fmt::func;
#endif
#if FMT_VERSION >= 80000
#include <fmt/xchar.h>
#endif
#if FMT_VERSION >= 60000
#include <fmt/chrono.h>
#else
#include <fmt/time.h>
#endif

namespace nonstd { namespace sv_lite {
template<class CharT, class Traits>
Expand Down
1 change: 0 additions & 1 deletion gframe/logging.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "logging.h"
#include <ctime>
#include <fmt/chrono.h>
#include "file_stream.h"

namespace ygo {
Expand Down
3 changes: 1 addition & 2 deletions gframe/menu_handler.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "config.h"
#include <fmt/chrono.h>
#include "client_updater.h"
#include "game_config.h"
#include "menu_handler.h"
Expand Down Expand Up @@ -665,7 +664,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
if(sel == -1)
break;
const auto& selection = DuelClient::hosts[sel];
mainGame->ebJoinHost->setText(fmt::to_wstring(selection.address).data());
mainGame->ebJoinHost->setText(fmt::format(L"{}", selection.address).data());
mainGame->ebJoinPort->setText(fmt::to_wstring(selection.port).data());
break;
}
Expand Down
1 change: 0 additions & 1 deletion gframe/single_mode.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "single_mode.h"
#include <fmt/chrono.h>
#include "game_config.h"
#include "duelclient.h"
#include "game.h"
Expand Down
1 change: 0 additions & 1 deletion gframe/utils_gui.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "utils_gui.h"
#include <irrlicht.h>
#include <ICursorControl.h>
#include <fmt/chrono.h>
#include "config.h"
#include "utils.h"
#include "game_config.h"
Expand Down

0 comments on commit 29216bd

Please sign in to comment.