Merge pull request #1617 from alebastr/fmt-9

fix: adapt to fmt 9.0.0 breaking changes
This commit is contained in:
Alex 2022-07-18 10:00:46 +02:00 committed by GitHub
commit d906080f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 21 deletions

View File

@ -1,11 +1,6 @@
#pragma once
#include <fmt/format.h>
#if FMT_VERSION < 60000
#include <fmt/time.h>
#else
#include <fmt/chrono.h>
#endif
#include <gtkmm/label.h>
#include "AModule.hpp"

View File

@ -1,11 +1,7 @@
#pragma once
#include <fmt/format.h>
#if FMT_VERSION < 60000
#include <fmt/time.h>
#else
#include <fmt/chrono.h>
#endif
#include "ALabel.hpp"
#include "util/sleeper_thread.hpp"

View File

@ -1,7 +1,15 @@
#pragma once
#include <fmt/ostream.h>
#include <json/json.h>
#if (FMT_VERSION >= 90000)
template <>
struct fmt::formatter<Json::Value> : ostream_formatter {};
#endif
namespace waybar::util {
struct JsonParser {

View File

@ -1,12 +1,12 @@
#include "client.hpp"
#include <fmt/ostream.h>
#include <spdlog/spdlog.h>
#include <iostream>
#include "idle-inhibit-unstable-v1-client-protocol.h"
#include "util/clara.hpp"
#include "util/format.hpp"
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
waybar::Client *waybar::Client::inst() {

View File

@ -1,6 +1,5 @@
#include "config.hpp"
#include <fmt/ostream.h>
#include <spdlog/spdlog.h>
#include <unistd.h>
#include <wordexp.h>

View File

@ -1,15 +1,10 @@
#include "modules/clock.hpp"
#include <fmt/chrono.h>
#include <spdlog/spdlog.h>
#include <iomanip>
#if FMT_VERSION < 60000
#include <fmt/time.h>
#else
#include <fmt/chrono.h>
#endif
#include <ctime>
#include <iomanip>
#include <sstream>
#include <type_traits>

View File

@ -10,6 +10,13 @@ namespace waybar::modules {
} // namespace waybar::modules
#endif
#if FMT_VERSION >= 90000
/* Satisfy fmt 9.x deprecation of implicit conversion of enums to int */
auto format_as(enum mpd_idle val) {
return static_cast<std::underlying_type_t<enum mpd_idle>>(val);
}
#endif
namespace waybar::modules::detail {
#define IDLE_RUN_NOIDLE_AND_CMD(...) \

View File

@ -1,6 +1,5 @@
#include "modules/sni/host.hpp"
#include <fmt/ostream.h>
#include <spdlog/spdlog.h>
namespace waybar::modules::SNI {

View File

@ -1,6 +1,5 @@
#include "modules/sway/bar.hpp"
#include <fmt/ostream.h>
#include <spdlog/spdlog.h>
#include <sstream>