diff --git a/engine/sim/sim_ostream.hpp b/engine/sim/sim_ostream.hpp index 46ca12f14fa..19c977413a3 100644 --- a/engine/sim/sim_ostream.hpp +++ b/engine/sim/sim_ostream.hpp @@ -59,10 +59,22 @@ struct sim_ostream_t std::ostream* get_stream() { return _raw.get_stream(); } template - sim_ostream_t & operator<< (T const& rhs); + sim_ostream_t & operator<< (T const& rhs) + { + print_simulation_time(); + _raw << rhs << "\n"; + + return *this; + } template - sim_ostream_t& printf(Format&& format, Args&& ... args); + sim_ostream_t& printf(Format&& format, Args&& ... args) + { + print_simulation_time(); + fmt::fprintf(*_raw.get_stream(), std::forward(format), std::forward(args)... ); + _raw << "\n"; + return *this; + } /** * Print using fmt libraries python-like formatting syntax. @@ -78,14 +90,4 @@ struct sim_ostream_t void print_simulation_time(); sim_t& sim; sc_raw_ostream_t _raw; -}; - - -template -sim_ostream_t& sim_ostream_t::printf(Format&& format, Args&& ... args) -{ - print_simulation_time(); - fmt::fprintf(*_raw.get_stream(), std::forward(format), std::forward(args)... ); - _raw << "\n"; - return *this; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/engine/simulationcraft.hpp b/engine/simulationcraft.hpp index 43be82ef7e0..ed9c01e2940 100644 --- a/engine/simulationcraft.hpp +++ b/engine/simulationcraft.hpp @@ -2452,16 +2452,6 @@ inline bool cooldown_t::is_ready() const return queueable() <= sim.current_time(); } -template -sim_ostream_t& sim_ostream_t::operator<< (T const& rhs) -{ - fmt::fprintf(*_raw.get_stream(), "%.3f ", sim.current_time().total_seconds()); - _raw << rhs << "\n"; - - return *this; -} - - struct ground_aoe_params_t { enum hasted_with