diff options
author | Norbert Preining <norbert@preining.info> | 2019-10-29 03:00:39 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-10-29 03:00:39 +0000 |
commit | 97f5151099967e6c823d640a90d87bca92c44035 (patch) | |
tree | 685caa49488599f87d0caa4e972833b2263d8567 /dviware/dvisvgm/src/Matrix.cpp | |
parent | 25a647b97ef526aefcc75269dd19c46dbe3ae4c1 (diff) |
CTAN sync 201910290300
Diffstat (limited to 'dviware/dvisvgm/src/Matrix.cpp')
-rw-r--r-- | dviware/dvisvgm/src/Matrix.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/dviware/dvisvgm/src/Matrix.cpp b/dviware/dvisvgm/src/Matrix.cpp index 7b425596e9..f94e84809c 100644 --- a/dviware/dvisvgm/src/Matrix.cpp +++ b/dviware/dvisvgm/src/Matrix.cpp @@ -396,11 +396,8 @@ Matrix Matrix::parse (istream &is, Calculator &calc) { if (c != 'X' && c != 'Y') throw ParserException("transformation command 'K' must be followed by 'X' or 'Y'"); double a = getArgument(is, calc, 0, false, false); - if (std::abs(cos(deg2rad(a))) < numeric_limits<double>::epsilon()) { - ostringstream oss; - oss << "illegal skewing angle: " << a << " degrees"; - throw ParserException(oss.str()); - } + if (std::abs(cos(deg2rad(a))) < numeric_limits<double>::epsilon()) + throw ParserException("illegal skewing angle: " + util::to_string(a) + " degrees"); if (c == 'X') ret.xskewByAngle(a); else @@ -419,9 +416,7 @@ Matrix Matrix::parse (istream &is, Calculator &calc) { break; } default: - ostringstream oss; - oss << "transformation command expected (found '" << char(cmd) << "' instead)"; - throw ParserException(oss.str()); + throw ParserException("transformation command expected (found '" + string(1, cmd) + "' instead)"); } } return ret; @@ -606,4 +601,4 @@ XSkewingMatrix::XSkewingMatrix (double deg) { YSkewingMatrix::YSkewingMatrix (double deg) { double xyratio = tan(deg2rad(deg)); lmultiply(Matrix({1, 0, 0, xyratio})); -}
\ No newline at end of file +} |