]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4671 pt4: refactor Format::assemble()
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Mar 2017 11:52:37 +0000 (00:52 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Mar 2017 11:52:37 +0000 (00:52 +1300)
commit6d19fc4dbb47a9b6993057c8599cd57f29d1475a
tree6f4aea21cd4dd4c9eb30334891d9d6af2d3efd39
parent3fdf6904e3d7e87e6e5a47c893352670d7286a69
Bug 4671 pt4: refactor Format::assemble()

* replace the String local with an SBuf to get appendf()

* overdue removal of empty lines and '!= NULL' conditions

* reduce scope redux for many out assignments

* use sizeof(tmp) instead of '1024'

* Fixes many GCC 7 compile errors from snprintf() being called with a
  too-small buffer.

* update the for-loops in Adaptation::History to C++11 and produce output
  in an SBuf. Removing need for iterator typedef's and resolving more GCC 7
  warnings about too-small buffers for snprintf().
src/adaptation/History.cc
src/adaptation/History.h
src/format/Format.cc