diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-27 17:36:04 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-27 17:36:04 +0200 |
| commit | 96f2ef35072e9caf1e87debf0566d61c35a05d65 (patch) | |
| tree | c622c5d7353e2feb99cf11a1cb4657f9be011d26 | |
| parent | f677d0d5ac2376f6cb60a6125be53b06f338a3d2 (diff) | |
a
| -rw-r--r-- | serialize/magnum-vector2i.hpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/serialize/magnum-vector2i.hpp b/serialize/magnum-vector2i.hpp index 00df0e46..02e1fdd1 100644 --- a/serialize/magnum-vector2i.hpp +++ b/serialize/magnum-vector2i.hpp @@ -1,3 +1,4 @@ +#include "compat/assert.hpp" #include <cstdio> #include <string> #include <Magnum/Math/Vector2.h> @@ -26,13 +27,7 @@ struct adl_serializer<Magnum::Math::Vector2<t>> final int n = 0; int ret = std::sscanf(str.c_str(), format_string, &x, &y, &n); if (ret != 2 || (std::size_t)n != str.size() || x != (t)x || y != (t)y) - { - std::string msg; msg.reserve(128); - msg += "failed to parse string '"; - msg += str; - msg += "' as Magnum::Vector2"; - throw std::invalid_argument(msg); - } + fm_abort("failed to parse Vector2"); val = { (t)x, (t)y }; } }; |
