diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
commit | 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch) | |
tree | fd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/core/StarBiMap.hpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/core/StarBiMap.hpp')
-rw-r--r-- | source/core/StarBiMap.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/core/StarBiMap.hpp b/source/core/StarBiMap.hpp index 3953fde..8e3d616 100644 --- a/source/core/StarBiMap.hpp +++ b/source/core/StarBiMap.hpp @@ -179,7 +179,7 @@ template <typename LeftT, typename RightT, typename LeftMapT, typename RightMapT BiMap<LeftT, RightT, LeftMapT, RightMapT>::BiMap(std::initializer_list<value_type> list) { for (value_type const& v : list) { if (!insert(v.first, v.second)) - throw MapException::format("Repeat pair in BiMap initializer_list construction: (%s, %s)", outputAny(v.first), outputAny(v.second)); + throw MapException::format("Repeat pair in BiMap initializer_list construction: ({}, {})", outputAny(v.first), outputAny(v.second)); } } @@ -324,10 +324,10 @@ bool BiMap<LeftT, RightT, LeftMapT, RightMapT>::insert(Left const& left, Right c template <typename LeftT, typename RightT, typename LeftMapT, typename RightMapT> void BiMap<LeftT, RightT, LeftMapT, RightMapT>::add(Left const& left, Right const& right) { if (m_leftMap.contains(left)) - throw MapException(strf("BiMap already contains left side value '%s'", outputAny(left))); + throw MapException(strf("BiMap already contains left side value '{}'", outputAny(left))); if (m_rightMap.contains(right)) - throw MapException(strf("BiMap already contains right side value '%s'", outputAny(right))); + throw MapException(strf("BiMap already contains right side value '{}'", outputAny(right))); insert(left, right); } |