Skip to content

Small code clean up

  • TestFunctors.h: drop unused template sequence

    • std::integer_sequence<SIMDWrapper::InstructionSet, ...> is not used and it can be removed. Moreover, it is an abuse of std::integer_sequence, because SIMDWrapper::InstructionSet is not an integral type and gcc14 does not accept it.
  • MaterialLocatorBase.cpp: simpler implementation of for_each_adjacent_pair

    • Using std::mismatch is a clever abuse of an STL algorithm for something it was not meant to do (hence the special trick of swappting twice the order of arguments and the artificial return true), but it doesn't bring much benefit (it actually makes the code difficult to understand). See b625a107

      Unfortunately, gcc 14 warns that we are not using what std::mismatch return, so I changed the implementation to use a simple loop that is somehow more understandable (thanks to a LLM).

  • SelectiveBremMatchAlg.cpp: use the return value of std::all_of (as requested by gcc 14)

Edited by Marco Clemencic

Merge request reports

Loading