diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-19 23:51:42 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-04-19 23:51:42 +0000 |
commit | e836786d752c6dc3490255917e1339be5b52d55a (patch) | |
tree | 9f6bd67e51784e9cf6f533227b6157d68715dace /Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp | |
parent | 70873fbc1b23e1fa77240c892895d4eed21e2e34 (diff) |
dvisvgm 1.15.1
git-svn-id: svn://tug.org/texlive/trunk@40624 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp index e556e2b6b69..90bb4c29a47 100644 --- a/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp +++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/Matrix.cpp @@ -30,8 +30,6 @@ using namespace std; - - /** Computes the determinant of a given matrix */ double det (const Matrix &m) { double sum=0; @@ -332,8 +330,7 @@ bool Matrix::isTranslation (double &tx, double &ty) const { * @param[in] leadingComma true if first non-blank must be a comma * @return value of argument */ static double getArgument (istream &is, Calculator &calc, double def, bool optional, bool leadingComma) { - while (isspace(is.peek())) - is.get(); + is >> ws; if (!optional && leadingComma && is.peek() != ',') throw ParserException("',' expected"); if (is.peek() == ',') { @@ -341,7 +338,7 @@ static double getArgument (istream &is, Calculator &calc, double def, bool optio optional = false; // now we expect a parameter } string expr; - while (is && !isupper(is.peek()) && is.peek() != ',') + while (!isupper(is.peek()) && is.peek() != ',' && is) expr += (char)is.get(); if (expr.length() == 0) { if (optional) @@ -356,8 +353,7 @@ static double getArgument (istream &is, Calculator &calc, double def, bool optio Matrix& Matrix::parse (istream &is, Calculator &calc) { *this = Matrix(1); while (is) { - while (isspace(is.peek())) - is.get(); + is >> ws; int cmd = is.get(); switch (cmd) { case 'T': { @@ -418,7 +414,7 @@ Matrix& Matrix::parse (istream &is, Calculator &calc) { } default: ostringstream oss; - oss << "transformation command expected (found '" << cmd << "' instead)"; + oss << "transformation command expected (found '" << char(cmd) << "' instead)"; throw ParserException(oss.str()); } } @@ -488,4 +484,3 @@ RotationMatrix::RotationMatrix (double deg) { set(v, 5); } - |