Skip to content
Snippets Groups Projects
  1. Jan 23, 2025
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format with "east const" · 7dec9555
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`, now with "east const" enforcement.
      Use `clang-format` version 18.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      7dec9555
  2. Jan 18, 2023
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-15 · f685d817
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 15.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      f685d817
  3. Oct 25, 2021
  4. May 08, 2020
  5. Mar 03, 2020
    • Hans Johnson's avatar
      STYLE: Use range-based loops from C++11 · 6621b069
      Hans Johnson authored
      C++11 Range based for loops can be used in
      
      Used as a more readable equivalent to the traditional for loop operating over a
      range of values, such as all elements in a container, in the forward direction..
      
      Range based loopes are more explicit for only computing the
      end location once for containers.
      6621b069
    • Hans Johnson's avatar
      STYLE: Use auto for variable type matches the type of the initializer · cc8fc323
      Hans Johnson authored
      This check is responsible for using the auto type specifier for variable
      declarations to improve code readability and maintainability.
      
      The auto type specifier will only be introduced in situations where the
      variable type matches the type of the initializer expression. In other words
      auto should deduce the same type that was originally spelled in the source
      cc8fc323
  6. Mar 02, 2020
    • Hans Johnson's avatar
      PERF: readability container size empty · 691d5612
      Hans Johnson authored
      The emptiness of a container should be checked using the empty() method
      instead of the size() method. It is not guaranteed that size() is a
      constant-time function, and it is generally more efficient and also
      shows clearer intent to use empty(). Furthermore some containers may
      implement the empty() method but not implement the size() method. Using
      empty() whenever possible makes it easier to switch to another container
      in the future.
      
      cd
      run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,readability-container-size-empty  -header-filter=.* -fix
      691d5612
  7. Sep 17, 2019
  8. May 31, 2018
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format-6.0 · 828b6837
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a
      new style defined by `.clang-format`.  Use `clang-format` version 6.0.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      828b6837
  9. Dec 21, 2017
  10. Oct 05, 2017
  11. May 06, 2017
  12. Apr 17, 2017
    • Brad King's avatar
      Encoding: Add ToWindowsExtendedPath function · e71a3406
      Brad King authored
      Move the implementation of `SystemTools::ConvertToWindowsExtendedPath`
      over to a new function in `Encoding`.  It does not depend on other
      things `SystemTools` and will be useful in other KWSys components
      that already depend on `Encoding` but not `SystemTools`.
      e71a3406
  13. Dec 02, 2016
  14. Nov 04, 2016
    • Kitware Robot's avatar
      Revise C++ coding style using clang-format · 6c973b46
      Kitware Robot authored and Brad King's avatar Brad King committed
      Run the `clang-format.bash` script to update all our C and C++ code to a new
      style defined by `.clang-format`.  Use `clang-format` version 3.8.
      
      * If you reached this commit for a line in `git blame`, re-run the blame
        operation starting at the parent of this commit to see older history
        for the content.
      
      * See the parent commit for instructions to rebase a change across this
        style transition commit.
      
      Change-Id: Ie3aedc03bfe5c3999d4a077fafb8c6f3bbffc5c5
      6c973b46
    • Brad King's avatar
      Simplify KWSys per-source license notices · c41c1bc4
      Brad King authored
      Per-source copyright/license notice headers that spell out copyright holder
      names and years are hard to maintain and often out-of-date or plain wrong.
      Precise contributor information is already maintained automatically by the
      version control tool.  Ultimately it is the receiver of a file who is
      responsible for determining its licensing status, and per-source notices are
      merely a convenience.  Therefore it is simpler and more accurate for
      each source to have a generic notice of the license name and references to
      more detailed information on copyright holders and full license terms.
      
      Our `Copyright.txt` file now contains a list of Contributors whose names
      appeared source-level copyright notices.  It also references version control
      history for more precise information.  Therefore we no longer need to spell
      out the list of Contributors in each source file notice.
      
      Replace KWSys per-source copyright/license notice headers with a short
      description of the license and links to `Copyright.txt` and online
      information available from "https://cmake.org/licensing#kwsys".
      
      Run the `filter-notices.bash` script to perform the replacements mechanically.
      Manually fix up the shebang line in one file.
      
      Change-Id: I8497f7c868664dcf54a8608ab302ad93c860b334
      c41c1bc4
    • Brad King's avatar
      Sort includes to stabilize include order w.r.t. clang-format · 15e90a3c
      Brad King authored
      The clang-format tool sorts `#include` lines within contiguous blocks.
      Separate blocks with blank lines and sort the include lines within them
      so that clang-format does not re-order anything.
      
      Change-Id: I96d6828f470b9a234464972172d46afab322487c
      15e90a3c
  15. Mar 22, 2016
  16. Aug 28, 2015
  17. Dec 19, 2013
  18. Oct 31, 2013
Loading