diff --git a/engine/action/dot.hpp b/engine/action/dot.hpp index cd0e5fb4854..ff260d998c6 100644 --- a/engine/action/dot.hpp +++ b/engine/action/dot.hpp @@ -98,7 +98,7 @@ struct dot_t : private noncopyable void last_tick(); bool channel_interrupt(); - friend void format_to( const dot_t&, fmt::format_context::iterator ); + friend void sc_format_to( const dot_t&, fmt::format_context::iterator ); void reschedule_tick(); private: diff --git a/engine/action/sc_action.cpp b/engine/action/sc_action.cpp index 68834245361..ffe14859883 100644 --- a/engine/action/sc_action.cpp +++ b/engine/action/sc_action.cpp @@ -4497,7 +4497,7 @@ double action_t::last_tick_factor(const dot_t* /* d */, timespan_t time_to_tick, return std::min(1.0, duration / time_to_tick); } -void format_to( const action_t& action, fmt::format_context::iterator out ) +void sc_format_to( const action_t& action, fmt::format_context::iterator out ) { if ( action.sim->log_spell_id ) { diff --git a/engine/action/sc_action.hpp b/engine/action/sc_action.hpp index 799214040fa..e1de66525f3 100644 --- a/engine/action/sc_action.hpp +++ b/engine/action/sc_action.hpp @@ -1012,7 +1012,7 @@ struct action_t : private noncopyable return( r == BLOCK_RESULT_BLOCKED || r == BLOCK_RESULT_CRIT_BLOCKED ); } - friend void format_to( const action_t&, fmt::format_context::iterator ); + friend void sc_format_to( const action_t&, fmt::format_context::iterator ); }; struct call_action_list_t : public action_t diff --git a/engine/action/sc_dot.cpp b/engine/action/sc_dot.cpp index a1079cb02de..1c2e8d864aa 100644 --- a/engine/action/sc_dot.cpp +++ b/engine/action/sc_dot.cpp @@ -1078,7 +1078,7 @@ void dot_t::dot_end_event_t::execute() dot->last_tick(); } -void format_to( const dot_t& dot, fmt::format_context::iterator out ) +void sc_format_to( const dot_t& dot, fmt::format_context::iterator out ) { fmt::format_to( out, "Dot {}", dot.name_str ); } diff --git a/engine/buff/sc_buff.cpp b/engine/buff/sc_buff.cpp index c53ef07a26c..8687350d0ec 100644 --- a/engine/buff/sc_buff.cpp +++ b/engine/buff/sc_buff.cpp @@ -2803,7 +2803,7 @@ void buff_t::update_stack_uptime_array( timespan_t current_time, int old_stacks uptime_array.add( end_time, end_partial.total_seconds() * mul ); } -void format_to( const buff_t& buff, fmt::format_context::iterator out ) +void sc_format_to( const buff_t& buff, fmt::format_context::iterator out ) { if ( buff.sim->log_spell_id ) { diff --git a/engine/buff/sc_buff.hpp b/engine/buff/sc_buff.hpp index 5e94c746100..7075140f217 100644 --- a/engine/buff/sc_buff.hpp +++ b/engine/buff/sc_buff.hpp @@ -364,7 +364,7 @@ struct buff_t : private noncopyable virtual buff_t* apply_affecting_conduit( const conduit_data_t& conduit, int effect_num = 1 ); virtual buff_t* apply_affecting_conduit_effect( const conduit_data_t& conduit, size_t effect_num ); - friend void format_to( const buff_t&, fmt::format_context::iterator ); + friend void sc_format_to( const buff_t&, fmt::format_context::iterator ); private: void update_trigger_calculations(); void adjust_haste(); diff --git a/engine/item/item.cpp b/engine/item/item.cpp index e280bfc9686..8d91d05c48c 100644 --- a/engine/item/item.cpp +++ b/engine/item/item.cpp @@ -367,7 +367,7 @@ std::string item_t::socket_bonus_stats_str() const return str; } -void format_to( const item_t& item, fmt::format_context::iterator out ) +void sc_format_to( const item_t& item, fmt::format_context::iterator out ) { fmt::format_to( out, "name={} id={}", item.name_str, item.parsed.data.id ); if ( item.slot != SLOT_INVALID ) diff --git a/engine/item/item.hpp b/engine/item/item.hpp index 2144d36969b..e7a00c0918b 100644 --- a/engine/item/item.hpp +++ b/engine/item/item.hpp @@ -217,5 +217,5 @@ struct item_t const special_effect_t* special_effect( special_effect_source_e source = SPECIAL_EFFECT_SOURCE_NONE, special_effect_e type = SPECIAL_EFFECT_NONE ) const; const special_effect_t* special_effect_with_name( util::string_view name, special_effect_source_e source = SPECIAL_EFFECT_SOURCE_NONE, special_effect_e type = SPECIAL_EFFECT_NONE ) const; - friend void format_to( const item_t&, fmt::format_context::iterator ); + friend void sc_format_to( const item_t&, fmt::format_context::iterator ); }; diff --git a/engine/item/special_effect.cpp b/engine/item/special_effect.cpp index d95d468d78b..fd446dfc886 100644 --- a/engine/item/special_effect.cpp +++ b/engine/item/special_effect.cpp @@ -857,7 +857,7 @@ std::string special_effect_t::name() const return n; } -void format_to( const special_effect_t& se, fmt::format_context::iterator out ) +void sc_format_to( const special_effect_t& se, fmt::format_context::iterator out ) { fmt::format_to( out, "{}", se.name() ); fmt::format_to( out, " type={}", se.type ); diff --git a/engine/item/special_effect.hpp b/engine/item/special_effect.hpp index 2fc10197c38..907cefa2ddd 100644 --- a/engine/item/special_effect.hpp +++ b/engine/item/special_effect.hpp @@ -156,5 +156,5 @@ struct special_effect_t timespan_t duration() const; timespan_t tick_time() const; - friend void format_to( const special_effect_t&, fmt::format_context::iterator ); + friend void sc_format_to( const special_effect_t&, fmt::format_context::iterator ); }; diff --git a/engine/player/gear_stats.hpp b/engine/player/gear_stats.hpp index 8c00a8ec9d2..362cb291bbb 100644 --- a/engine/player/gear_stats.hpp +++ b/engine/player/gear_stats.hpp @@ -137,5 +137,5 @@ struct gear_stats_t double get_stat( stat_e stat ) const; static double stat_mod( stat_e stat ); - friend void format_to( const gear_stats_t&, fmt::format_context::iterator ); + friend void sc_format_to( const gear_stats_t&, fmt::format_context::iterator ); }; \ No newline at end of file diff --git a/engine/player/pet.hpp b/engine/player/pet.hpp index e06115b1f2d..975c853a8ea 100644 --- a/engine/player/pet.hpp +++ b/engine/player/pet.hpp @@ -137,5 +137,5 @@ struct pet_t : public player_t void acquire_target( retarget_source /* event */, player_t* /* context */ = nullptr ) override; - friend void format_to( const pet_t&, fmt::format_context::iterator ); + friend void sc_format_to( const pet_t&, fmt::format_context::iterator ); }; \ No newline at end of file diff --git a/engine/player/rating.cpp b/engine/player/rating.cpp index 9cbeddf1cbd..33f01eb694e 100644 --- a/engine/player/rating.cpp +++ b/engine/player/rating.cpp @@ -97,7 +97,7 @@ void rating_t::init(dbc_t& dbc, int level) } } -void format_to( const rating_t& r, fmt::format_context::iterator out ) +void sc_format_to( const rating_t& r, fmt::format_context::iterator out ) { for (rating_e i = static_cast(0); i < RATING_MAX; ++i) fmt::format_to( out, "{}{}={}", i ? " " : "", cache_from_rating(i), r.get(i) ); // hacky diff --git a/engine/player/rating.hpp b/engine/player/rating.hpp index e6a0b25cb61..63b0ab73bec 100644 --- a/engine/player/rating.hpp +++ b/engine/player/rating.hpp @@ -35,5 +35,5 @@ struct rating_t void init(dbc_t& dbc, int level); - friend void format_to( const rating_t&, fmt::format_context::iterator ); + friend void sc_format_to( const rating_t&, fmt::format_context::iterator ); }; \ No newline at end of file diff --git a/engine/player/sc_pet.cpp b/engine/player/sc_pet.cpp index 84f4c1102fa..a44e4840cb6 100644 --- a/engine/player/sc_pet.cpp +++ b/engine/player/sc_pet.cpp @@ -438,7 +438,7 @@ void pet_t::acquire_target( retarget_source event, player_t* context ) } } -void format_to( const pet_t& pet, fmt::format_context::iterator out ) +void sc_format_to( const pet_t& pet, fmt::format_context::iterator out ) { fmt::format_to( out, "Pet '{}'", pet.full_name_str ); } diff --git a/engine/player/sc_player.cpp b/engine/player/sc_player.cpp index 41fb40fdda7..31d2d286488 100644 --- a/engine/player/sc_player.cpp +++ b/engine/player/sc_player.cpp @@ -1349,7 +1349,7 @@ player_t::base_initial_current_t::base_initial_current_t() : range::fill( attribute_multiplier, 1.0 ); } -void format_to( const player_t::base_initial_current_t& s, fmt::format_context::iterator out ) +void sc_format_to( const player_t::base_initial_current_t& s, fmt::format_context::iterator out ) { fmt::format_to( out, "{}", s.stats ); fmt::format_to( out, " spell_power_per_intellect={}", s.spell_power_per_intellect ); @@ -13176,7 +13176,7 @@ void player_t::init_distance_targeting() } } -void format_to( const player_t& player, fmt::format_context::iterator out ) +void sc_format_to( const player_t& player, fmt::format_context::iterator out ) { fmt::format_to( out, "Player '{}'", player.name() ); } diff --git a/engine/player/sc_player.hpp b/engine/player/sc_player.hpp index 7e57461b2ac..fef67efbdee 100644 --- a/engine/player/sc_player.hpp +++ b/engine/player/sc_player.hpp @@ -221,7 +221,7 @@ struct player_t : public actor_t double spell_power_multiplier, attack_power_multiplier, base_armor_multiplier, armor_multiplier; position_e position; - friend void format_to( const base_initial_current_t&, fmt::format_context::iterator ); + friend void sc_format_to( const base_initial_current_t&, fmt::format_context::iterator ); } base, // Base values, from some database or overridden by user initial, // Base + Passive + Gear (overridden or items) + Player Enchants + Global Enchants @@ -1246,7 +1246,7 @@ struct player_t : public actor_t spawner::base_actor_spawner_t* find_spawner( util::string_view id ) const; int nth_iteration() const; - friend void format_to( const player_t&, fmt::format_context::iterator ); + friend void sc_format_to( const player_t&, fmt::format_context::iterator ); // Indicates whether the player uses PTR dbc data bool is_ptr() const; diff --git a/engine/player/sc_set_bonus.cpp b/engine/player/sc_set_bonus.cpp index 509be3fa84e..054e690cf3c 100644 --- a/engine/player/sc_set_bonus.cpp +++ b/engine/player/sc_set_bonus.cpp @@ -250,7 +250,7 @@ std::string set_bonus_t::to_string() const } -void format_to( const set_bonus_t& sb, fmt::format_context::iterator out ) +void sc_format_to( const set_bonus_t& sb, fmt::format_context::iterator out ) { int i = 0; for ( size_t idx = 0; idx < sb.set_bonus_spec_data.size(); idx++ ) diff --git a/engine/player/set_bonus.hpp b/engine/player/set_bonus.hpp index 51937ac9f60..322f1b816ba 100644 --- a/engine/player/set_bonus.hpp +++ b/engine/player/set_bonus.hpp @@ -75,5 +75,5 @@ struct set_bonus_t std::string to_profile_string(const std::string & = "\n") const; std::string generate_set_bonus_options() const; - friend void format_to( const set_bonus_t&, fmt::format_context::iterator ); + friend void sc_format_to( const set_bonus_t&, fmt::format_context::iterator ); }; diff --git a/engine/sim/event.hpp b/engine/sim/event.hpp index beebf79e5b2..33728b0b72e 100644 --- a/engine/sim/event.hpp +++ b/engine/sim/event.hpp @@ -96,7 +96,7 @@ struct event_t : private noncopyable } static void cancel( event_t*& e ); - friend void format_to( const event_t&, fmt::format_context::iterator ); + friend void sc_format_to( const event_t&, fmt::format_context::iterator ); protected: template diff --git a/engine/sim/raid_event.hpp b/engine/sim/raid_event.hpp index 0fb48742473..bed7e71e600 100644 --- a/engine/sim/raid_event.hpp +++ b/engine/sim/raid_event.hpp @@ -122,5 +122,5 @@ struct raid_event_t : private noncopyable event_t* start_event; event_t* end_event; - friend void format_to( const raid_event_t&, fmt::format_context::iterator ); + friend void sc_format_to( const raid_event_t&, fmt::format_context::iterator ); }; diff --git a/engine/sim/sc_cooldown.cpp b/engine/sim/sc_cooldown.cpp index 2dd5ec04c4a..14f669fd112 100644 --- a/engine/sim/sc_cooldown.cpp +++ b/engine/sim/sc_cooldown.cpp @@ -769,7 +769,7 @@ void cooldown_t::adjust_max_charges( int charge_change ) set_max_charges( new_charges ); } -void format_to( const cooldown_t& cooldown, fmt::format_context::iterator out ) +void sc_format_to( const cooldown_t& cooldown, fmt::format_context::iterator out ) { fmt::format_to( out, "Cooldown {}", cooldown.name_str ); } diff --git a/engine/sim/sc_cooldown.hpp b/engine/sim/sc_cooldown.hpp index ab279e91c49..bcfcc9af7a0 100644 --- a/engine/sim/sc_cooldown.hpp +++ b/engine/sim/sc_cooldown.hpp @@ -115,7 +115,7 @@ struct cooldown_t void set_max_charges( int new_max_charges ); void adjust_max_charges( int charge_change ); - friend void format_to( const cooldown_t&, fmt::format_context::iterator ); + friend void sc_format_to( const cooldown_t&, fmt::format_context::iterator ); private: void adjust_remaining_duration( double delta ); // Modify the remaining duration of an ongoing cooldown. diff --git a/engine/sim/sc_event.cpp b/engine/sim/sc_event.cpp index cdcc3bfa0db..f9df9c210c6 100644 --- a/engine/sim/sc_event.cpp +++ b/engine/sim/sc_event.cpp @@ -90,7 +90,7 @@ void event_t::cancel( event_t*& e ) e = nullptr; } -void format_to( const event_t& e, fmt::format_context::iterator out ) +void sc_format_to( const event_t& e, fmt::format_context::iterator out ) { fmt::format_to( out, "{}(#{})", e.name(), e.id ); } diff --git a/engine/sim/sc_gear_stats.cpp b/engine/sim/sc_gear_stats.cpp index db37af98363..495f81af938 100644 --- a/engine/sim/sc_gear_stats.cpp +++ b/engine/sim/sc_gear_stats.cpp @@ -251,7 +251,7 @@ double gear_stats_t::stat_mod( stat_e stat ) } } -void format_to( const gear_stats_t& s, fmt::format_context::iterator out ) +void sc_format_to( const gear_stats_t& s, fmt::format_context::iterator out ) { for ( stat_e i = STAT_STRENGTH; i < STAT_MAX; i++ ) { diff --git a/engine/sim/sc_option.cpp b/engine/sim/sc_option.cpp index cfa3185702f..17813d2f298 100644 --- a/engine/sim/sc_option.cpp +++ b/engine/sim/sc_option.cpp @@ -574,7 +574,7 @@ opts::parse_status option_t::parse( sim_t* sim, util::string_view name, util::st } } -void format_to( const option_t& option, fmt::format_context::iterator out ) +void sc_format_to( const option_t& option, fmt::format_context::iterator out ) { option.do_format_to( out ); } diff --git a/engine/sim/sc_option.hpp b/engine/sim/sc_option.hpp index f28a4b239d7..9f86cfdd445 100644 --- a/engine/sim/sc_option.hpp +++ b/engine/sim/sc_option.hpp @@ -46,7 +46,7 @@ struct option_t util::string_view name() const { return _name; } - friend void format_to( const option_t&, fmt::format_context::iterator ); + friend void sc_format_to( const option_t&, fmt::format_context::iterator ); protected: virtual opts::parse_status do_parse( sim_t*, util::string_view name, util::string_view value ) const = 0; virtual void do_format_to( fmt::format_context::iterator ) const = 0; @@ -67,9 +67,9 @@ parse_status parse( sim_t*, util::span>, util::s void parse( sim_t*, util::string_view context, util::span>, util::string_view options_str, const parse_status_fn_t& fn = nullptr ); } -inline void format_to( const std::unique_ptr& option, fmt::format_context::iterator out ) +inline void sc_format_to( const std::unique_ptr& option, fmt::format_context::iterator out ) { - format_to(*option, out); + sc_format_to(*option, out); } std::unique_ptr opt_string( util::string_view n, std::string& v ); diff --git a/engine/sim/sc_raid_event.cpp b/engine/sim/sc_raid_event.cpp index d475d521418..a318beade3a 100644 --- a/engine/sim/sc_raid_event.cpp +++ b/engine/sim/sc_raid_event.cpp @@ -2197,7 +2197,7 @@ double raid_event_t::evaluate_raid_event_expression( sim_t* s, util::string_view ; } -void format_to( const raid_event_t& raid_event, fmt::format_context::iterator out ) +void sc_format_to( const raid_event_t& raid_event, fmt::format_context::iterator out ) { fmt::format_to( out, "Raid event (type={} name={})", raid_event.type, raid_event.name ); } \ No newline at end of file diff --git a/engine/util/format.hpp b/engine/util/format.hpp index 4ffffcfbacb..c0bb87d8e38 100644 --- a/engine/util/format.hpp +++ b/engine/util/format.hpp @@ -14,7 +14,7 @@ template using void_t = void; template struct has_format_to : std::false_type {}; template struct has_format_to(), + void_t(), std::declval<::fmt::format_context::iterator>() ) ) > > : std::true_type {}; } } // namespace util::fmt_detail @@ -22,7 +22,7 @@ namespace fmt { /** * Generic fmt::formatter that supports any type T that has adl-discoverable - * format_to( const T&, fmt::format_context::iterator ) + * sc_format_to( const T&, fmt::format_context::iterator ) * overload. */ template @@ -30,7 +30,7 @@ struct formatter: constexpr auto parse( format_parse_context& ctx ) { return ctx.begin(); } format_context::iterator format( const T& v, format_context& ctx ) { auto out = ctx.out(); - format_to( v, out ); + sc_format_to( v, out ); return out; } }; diff --git a/engine/util/timespan.cpp b/engine/util/timespan.cpp index 218549eda78..78d34156621 100644 --- a/engine/util/timespan.cpp +++ b/engine/util/timespan.cpp @@ -9,7 +9,7 @@ namespace simc { -void format_to( timespan_t x, fmt::format_context::iterator out ) +void sc_format_to( timespan_t x, fmt::format_context::iterator out ) { fmt::format_to( out, "{:.3f}", x.total_seconds() ); } diff --git a/engine/util/timespan.hpp b/engine/util/timespan.hpp index 8eca8abf33c..e50424dad1c 100644 --- a/engine/util/timespan.hpp +++ b/engine/util/timespan.hpp @@ -219,7 +219,7 @@ namespace simc return timespan_t( std::numeric_limits::min() ); } - friend void format_to( timespan_t, fmt::format_context::iterator ); + friend void sc_format_to( timespan_t, fmt::format_context::iterator ); }; } // namespace simc