BRAINSia / BRAINSTools

A suite of tools for medical image processing focused on brain analysis
http://brainsia.github.io/BRAINSTools/
Apache License 2.0
111 stars 96 forks source link

ENH: Combined the logic of identical `if/else` and `switch` statements into one. #512

Closed kian-weimer closed 1 year ago

kian-weimer commented 3 years ago

There are code locations where the value of a switch or logic for an if/else is different, but the contents are the same. These have now been combined so the body is only written once. This reduces redundant code but may negatively affect readability. This implements the bugprone-branch-clone clang-tidy check. -”Repeated branch in conditional chain"