summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/VFReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/src/VFReader.cpp')
-rw-r--r--dviware/dvisvgm/src/VFReader.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/dviware/dvisvgm/src/VFReader.cpp b/dviware/dvisvgm/src/VFReader.cpp
index a618f96ef7..cff67c919c 100644
--- a/dviware/dvisvgm/src/VFReader.cpp
+++ b/dviware/dvisvgm/src/VFReader.cpp
@@ -66,9 +66,7 @@ int VFReader::executeCommand (ApproveAction approve) {
case 248: cmdPost(); break; // postamble
default : { // invalid opcode
replaceActions(actions); // reenable actions
- ostringstream oss;
- oss << "undefined VF command (opcode " << opcode << ')';
- throw VFException(oss.str());
+ throw VFException("undefined VF command (opcode " + std::to_string(opcode) + ")");
}
}
}
@@ -139,8 +137,7 @@ void VFReader::cmdLongChar () {
else {
uint32_t cc = readUnsigned(4); // character code
readUnsigned(4); // equals character width from corresponding TFM file
- vector<uint8_t> dvi(pl); // DVI subroutine
- readBytes(pl, dvi);
+ auto dvi = readBytes(pl); // DVI subroutine
_actions->defineVFChar(cc, std::move(dvi)); // call template method for user actions
}
}
@@ -154,8 +151,7 @@ void VFReader::cmdShortChar (int pl) {
else {
uint32_t cc = readUnsigned(1); // character code
readUnsigned(3); // character width from corresponding TFM file
- vector<uint8_t> dvi(pl); // DVI subroutine
- readBytes(pl, dvi);
+ auto dvi = readBytes(pl); // DVI subroutine
_actions->defineVFChar(cc, std::move(dvi)); // call template method for user actions
}
}