• Where not possible, use "auto" to get the iterator type.
    
    Editorial note: I have avoid this change for a long time because of
    not wanting to make gratuitous changes to version history, which can
    obscure when certain changes were made, but with having recently
    touched every single file to apply automatic code formatting and with
    making several broad changes to the API, I decided it was time to take
    the plunge and get rid of the older (pre-C++11) verbose iterator
    syntax. The new code is just easier to read and understand, and in
    many cases, it will be more effecient as fewer temporary copies are
    being made.
    
    m-holger, if you're reading, you can see that I've finally come
    around. :-)
    Jay Berkenbilt authored
     
    Browse File »
  • Change .clang-format and commit automated changes from a fresh run of
    format-code
    Jay Berkenbilt authored
     
    Browse File »




  • (patrepl and cleanpatch are my own utilities)
    
    patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh
    patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc
    patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc
    patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc
    patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh
    git restore include/qpdf/PointerHolder.hh
    cleanpatch
    ./format-code
    Jay Berkenbilt authored
     
    Browse File »

  • Add comments to force line breaks, parenthesize function arguments
    that are contatenated strings, etc. -- these kinds of changes improve
    clang-format's results and also cause emacs cc-mode to match
    clang-format. After this type of change, most of the time, when
    clang-format and emacs disagree, clang-format is better.
    Jay Berkenbilt authored
     
    Browse File »