summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/Matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/src/Matrix.cpp')
-rw-r--r--dviware/dvisvgm/src/Matrix.cpp13
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
+}