These are chat archives for buddhi1980/mandelbulber2

22nd
Jul 2018
Sebastian Jennen
@zebastian
Jul 22 2018 10:03
hey guys, about code "modernization":
the following clang-tidy modernization flags are not yet applied to the code base, as they are arguable:
  • modernize-loop-convert
    --> simplifies loops and may be more optimized
  • modernize-return-braced-init-list
    --> function returns braced initializers instead of qualified constructors --> {22 ,33} instead of QRect(22, 33)
  • modernize-use-auto
    auto type deduction removes declaring types
  • modernize-use-default-member-init
    --> default member init (init moved from initializer list to member init)
  • modernize-use-equals-default
    --> removes default function definition and replaces with default keyword
    To test these flags, just uncomment the specified flags here: https://github.com/buddhi1980/mandelbulber2/blob/master/mandelbulber2/tools/codeStyleCheck.php#L270 and run the script. You will need to have clang-tidy installed and specifiy the paths of RUN_CLANG_TIDY_EXEC_PATH and CLANG_APPLY_BINARY_PATH

IMHO the following are nice:

  • modernize-loop-convert
  • modernize-return-braced-init-list
  • modernize-use-auto
  • modernize-use-equals-default

And this one is worse:

  • modernize-use-default-member-init

What is your opinion?