Skip to content

Commit

Permalink
[3rdparty] fmt updates, match with std::format
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jun 9, 2024
1 parent 130e64f commit 11d75ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/fmt
Submodule fmt updated 175 files
1 change: 1 addition & 0 deletions cmake/deps/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ if(NOT TARGET fmt::fmt)
endif()

add_library(fmt::fmt ALIAS fmt)
add_library(fmt::fmt-header-only ALIAS fmt)
endif()

set(OSSIA_HAS_FMT 1 CACHE INTERNAL "")
8 changes: 4 additions & 4 deletions src/ossia/network/common/debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct formatter<ossia::access_mode>
}

template <typename FormatContext>
auto format(ossia::access_mode e, FormatContext& ctx)
auto format(ossia::access_mode e, FormatContext& ctx) const
{
string_view name = "unknown";
switch(e)
Expand Down Expand Up @@ -58,7 +58,7 @@ struct formatter<ossia::bounding_mode> final : formatter<string_view>
}

template <typename FormatContext>
auto format(ossia::bounding_mode e, FormatContext& ctx)
auto format(ossia::bounding_mode e, FormatContext& ctx) const
{
string_view name = "unknown";
switch(e)
Expand Down Expand Up @@ -96,7 +96,7 @@ struct formatter<ossia::domain> final : formatter<string_view>
}

template <typename FormatContext>
auto format(const ossia::domain& e, FormatContext& ctx)
auto format(const ossia::domain& e, FormatContext& ctx) const
{
return formatter<string_view>::format(e.to_pretty_string(), ctx);
}
Expand All @@ -112,7 +112,7 @@ struct formatter<ossia::net::node_base>
}

template <typename FormatContext>
auto format(const ossia::net::node_base& n, FormatContext& ctx)
auto format(const ossia::net::node_base& n, FormatContext& ctx) const
{
int num_indent = 0;
auto parent = n.get_parent();
Expand Down
3 changes: 3 additions & 0 deletions src/ossia/network/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

#include <boost/asio/executor_work_guard.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/strand.hpp>

#include <memory>

namespace ossia::net
{
using strand_type
= decltype(boost::asio::make_strand(std::declval<boost::asio::io_context&>()));
struct network_context
{
boost::asio::io_context context;
Expand Down
2 changes: 1 addition & 1 deletion src/ossia/network/osc/detail/osc_receive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct formatter<oscpack::ReceivedMessage>
}

template <typename FormatContext>
auto format(const oscpack::ReceivedMessage& m, FormatContext& ctx)
auto format(const oscpack::ReceivedMessage& m, FormatContext& ctx) const
{
auto out = ctx.out();
out = fmt::format_to(out, "{}", m.AddressPattern());
Expand Down

0 comments on commit 11d75ec

Please sign in to comment.