diff --git a/README.md b/README.md index 1f7def7..585a42e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Requirements ------------ * CUPS: tested with version 1.6. -* A C++11 compiler. A recent version of GCC or Clang will work. +* A C++11 compiler: GCC 4.6 or later, or a recent version of Clang. Copyright --------- diff --git a/src/brdecode.cc b/src/brdecode.cc index 8be0549..17f3685 100644 --- a/src/brdecode.cc +++ b/src/brdecode.cc @@ -16,6 +16,7 @@ // along with this program. If not, see . #include +#include #include #include #include @@ -127,9 +128,9 @@ void read_line() { } void read_block() { - uint8_t count = get(); + unsigned count = get(); count = count * 256 + get(); - for (int i = 0; i < count; ++i) { + for (unsigned i = 0; i < count; ++i) { read_line(); } } diff --git a/src/job.cc b/src/job.cc index 5336463..535d60d 100644 --- a/src/job.cc +++ b/src/job.cc @@ -27,6 +27,9 @@ namespace { class block { public: + block(): line_bytes_(0) { + } + void add_line(vector &&line) { assert(!line.empty()); line_bytes_ += line.size(); @@ -52,11 +55,11 @@ class block { } private: - const unsigned max_block_size_ = 16350; - const unsigned max_lines_per_block_ = 128; + static const unsigned max_block_size_ = 16350; + static const unsigned max_lines_per_block_ = 128; vector> lines_; - int line_bytes_ = 0; + int line_bytes_; }; } // namespace