Skip to content

Commit

Permalink
A first batch of fmt fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Oct 13, 2024
1 parent 288b6d9 commit 2eda38e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/obake/polynomials/d_packed_monomial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ inline void key_tex_stream_insert(::std::ostream &os, const d_packed_monomial<T,

// Raise to power, if the exponent is not one.
if (!tmp_mp.is_one()) {
*cur_oss << fmt::format("^{{{}}}", tmp_mp);
*cur_oss << fmt::format(fmt::runtime("^{{{}}}"), tmp_mp);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/polynomials/packed_monomial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void packed_monomial_tex_stream_insert(::std::ostream &os, const packed_monomial

// Raise to power, if the exponent is not one.
if (!tmp_mp.is_one()) {
*cur_oss << fmt::format("^{{{}}}", tmp_mp);
*cur_oss << fmt::format(fmt::runtime("^{{{}}}"), tmp_mp);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/power_series_01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,5 +1255,5 @@ TEST_CASE("fmt")
std::ostringstream oss;
oss << s;

REQUIRE(oss.str() == fmt::format("{}", s));
REQUIRE(oss.str() == fmt::format(fmt::runtime("{}"), s));
}
2 changes: 1 addition & 1 deletion test/series_04.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,5 @@ TEST_CASE("series fmt test")
std::ostringstream oss;
oss << s;

REQUIRE(oss.str() == fmt::format("{}", s));
REQUIRE(oss.str() == fmt::format(fmt::runtime("{}"), s));
}

0 comments on commit 2eda38e

Please sign in to comment.