Skip to content

Modernize/cleanup UT code

Gerhard Raven requested to merge cleanup-UT into master
  • simplify interaction between stripflip() and xInverted()
  • add const where appropriate
  • prefer C++ headers over C headers (eg. cstddef instead of stddef.h)
  • prefer std::memcpy over assignment to a reinterpret_cast-ed object (alignment!)
  • prefer inherited constructors instead of explictly forwarding constructructors
  • prefer string_view over const std::string&
  • prefer pragma once over header guards
  • make sure order of include files does not matter
  • let clang-format order the include files
  • remove unneccessary mutable qualifiers
  • avoid unneccessary copies
  • prefer standalone functions in anonymous namespace over member functions
  • remove unneccessary destructors
  • prefer boost::flat_map over GaudiUtils::VectorMap as it supports transparant lookup
  • prefer charconv and error check over stoul and exception handling, as it also allows the use of string_view
  • prefer member initialization on declaration
  • define trivial inline functions at their point of declaration
  • prefer monadic StatusCode functionality
  • do not compare bool to literal true or false in conditionals
  • move operator<< out of global namespace, make friend instead, change argument type from pointer to object
  • leave [[deprecated]] version in global namespace which takes pointer
  • move use of UTNames() out of UTDigit.h into UTDigit.cpp to keep it away from cling, which doesn't like boost::flat_map
  • update CMakeLists to reflect that DigitEvent now has a (tiny) library
  • remove UTNames and UTCluster from dictionary

must be applied in conjunction with Lbcom!538 (merged), Boole!328 (merged), Rec!2323 (merged)

Edited by Gerhard Raven

Merge request reports