Commit 95ef3552daf8245c9e07a60318423d591382de9e

Authored by m-holger
Committed by GitHub
2 parents 516d8856 71a4e66d

Merge pull request #1202 from m-holger/wip

Update README-maintainer with wip / modernize qpdf
README-maintainer.md
... ... @@ -285,6 +285,16 @@ Building docs from pull requests is also enabled.
285 285 * Avoid attaching too much metadata to objects and object handles
286 286 since those have to get copied around a lot.
287 287  
  288 +* Prefer std::string_view to std::string const& and char const*.
  289 +
  290 + * Where functions rely on strings being null-terminated, std::string_view may not be appropriate.
  291 +
  292 + * For return values, consider whether returning a string_view is safe or whether it is more appropriate
  293 + to return a std::string or std::string const&, especially in the public API.
  294 +
  295 + * NEVER replace a std::string const& return value with std::string_view in the public API.
  296 +
  297 +
288 298 ## ZLIB COMPATIBILITY
289 299  
290 300 The qpdf test suite is designed to be independent of the output of any
... ...
... ... @@ -2,6 +2,7 @@ Contents
2 2 ========
3 3  
4 4 - [Always](#always)
  5 +- [In Progress](#in-progress)
5 6 - [Next](#next)
6 7 - [Possible future JSON enhancements](#possible-future-json-enhancements)
7 8 - [QPDFJob](#qpdfjob)
... ... @@ -26,6 +27,28 @@ Always
26 27 * When close to release, make sure external-libs is building and follow instructions in
27 28 ../external-libs/README
28 29  
  30 +In Progress
  31 +===========
  32 +
  33 +Modernize qpdf
  34 +--------------
  35 +
  36 +Update code to make use of the facilities provided by C++17. In particular, replace early qpdf C-style code
  37 +with modern equivalent. Key updates are:
  38 +
  39 +* use the standard library where appropriate
  40 +* replace C-strings with std::string or std::string_view
  41 +* replace raw pointer with smart pointers or standard library containers
  42 +* replace std::string const& with std::string_view where appropriate
  43 +* replace std::shared_ptr with std::unique_ptr or references to the underlying object where appropriate
  44 +
  45 +Next steps are:
  46 +
  47 +* review function signatures in the public API
  48 +* replace code that uses QUtil::make_shared_cstr etc
  49 +
  50 +Except for the above, prefer to make modernization changes as part of other updates.
  51 +
29 52 Next
30 53 ====
31 54  
... ...