summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
index ef1096ef6b9..dd71ff92ab8 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/EPSFile.cpp
@@ -56,8 +56,7 @@ static size_t getline (istream &is, char *line, size_t n) {
}
-EPSFile::EPSFile (const std::string& fname) : _ifs(fname.c_str(), ios::binary), _headerValid(false), _offset(0), _pslength(0)
-{
+EPSFile::EPSFile (const string &fname) : _ifs(fname, ios::binary) {
if (_ifs) {
if (getUInt32(_ifs) != 0xC6D3D0C5) // no binary header present?
_ifs.seekg(0); // go back to the first byte
@@ -84,10 +83,10 @@ istream& EPSFile::istream () const {
}
-/** Extracts the bounding box information from the DSC header/footer (if present)
- * @param[out] box the extracted bounding box
- * @return true if %%BoundingBox data could be read successfully */
-bool EPSFile::bbox (BoundingBox &box) const {
+/** Extracts the bounding box information from the DSC header/footer (if present).
+ * @return the extracted bounding box */
+BoundingBox EPSFile::bbox () const {
+ BoundingBox box;
std::istream &is = EPSFile::istream();
if (is) {
char buf[64];
@@ -105,10 +104,10 @@ bool EPSFile::bbox (BoundingBox &box) const {
ir.parseInt(val[i]);
}
box = BoundingBox(val[0], val[1], val[2], val[3]);
- return true;
+ break;
}
}
}
}
- return false;
+ return box;
}