diff options
Diffstat (limited to 'dviware/dvisvgm/src/InputBuffer.hpp')
-rw-r--r-- | dviware/dvisvgm/src/InputBuffer.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dviware/dvisvgm/src/InputBuffer.hpp b/dviware/dvisvgm/src/InputBuffer.hpp index 1474ce0a52..a59cdc31c9 100644 --- a/dviware/dvisvgm/src/InputBuffer.hpp +++ b/dviware/dvisvgm/src/InputBuffer.hpp @@ -2,7 +2,7 @@ ** InputBuffer.hpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2020 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2021 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -40,12 +40,14 @@ struct InputBuffer { class StreamInputBuffer : public InputBuffer { public: explicit StreamInputBuffer (std::istream &is, size_t bufsize=1024); + StreamInputBuffer (const StreamInputBuffer &ib) =delete; ~StreamInputBuffer () override; int get () override; int peek () const override; int peek (size_t n) const override; bool eof () const override {return pos() == _size1 && _size2 == 0;} void invalidate () override {_bufptr = _buf1+_size1; _size2 = 0;} + void operator = (const StreamInputBuffer &ib) =delete; protected: int fillBuffer (uint8_t *buf); @@ -65,6 +67,7 @@ class StreamInputBuffer : public InputBuffer { class StringInputBuffer : public InputBuffer { public: explicit StringInputBuffer (const std::string &str) : _str(&str) {} + StringInputBuffer (const StreamInputBuffer &ib) =delete; void assign (const std::string &str) {_str = &str; _pos=0;} int get () override {return _pos < _str->length() ? _str->at(_pos++) : -1;} int peek () const override {return _pos < _str->length() ? _str->at(_pos) : -1;} @@ -81,6 +84,7 @@ class StringInputBuffer : public InputBuffer { class CharInputBuffer : public InputBuffer { public: CharInputBuffer (const char *buf, size_t size) : _pos(buf), _size(buf ? size : 0) {} + CharInputBuffer (const CharInputBuffer &ib) =delete; int get () override { if (_size == 0) @@ -112,6 +116,7 @@ class CharInputBuffer : public InputBuffer { class SplittedCharInputBuffer : public InputBuffer { public: SplittedCharInputBuffer (const char *buf1, size_t s1, const char *buf2, size_t s2); + SplittedCharInputBuffer (const SplittedCharInputBuffer &ib) =delete; int get () override; int peek () const override; int peek (size_t n) const override; |