Skip to content

Dropped usage of (UN)LIKELY macro

Sebastien Ponce requested to merge sponce_attemptDropLIKELY into master

This is part of a set of MRs : !3113 (merged) Lbcom!574 (merged) Rec!2499 (merged) Phys!972 (merged) Allen!617 (merged) Boole!351 (merged) Analysis!810 (merged) Panoptes!125 (merged) Gauss!758 (merged) Castelao!112 (merged) Kepler!51 (merged) Online!521 (merged) Run2Support!14 (merged)

Note for those having to resolve conlicts due to this (set of) MRs. One way to solve the conflict is simply to keep your changes for the problematic files when you rebase in git via git checkout --ours and then redo the work of this MR by hand via the following single line (basically using sed to drop the macros) :

for f in `git grep LIKELY | cut -d ':' -f 1 | uniq`; do sed -i -E -e 's/(UN)?LIKELY\( ([^()]*) \)/\2/' -e 's/(UN)?LIKELY\( ([^()]*)\(([^()]*)\)([^()]*) \)/\2(\3)\4/' -e 's/(UN)?LIKELY\( ([^()]*)\(([^()]*)\)([^()]*)\(([^()]*)\)([^()]*) \)/\2(\3)\4(\5)\6/'  -e 's/(UN)?LIKELY\( ([^()]*)\(([^()]*)\)([^()]*)\(([^()]*)\)([^()]*)\(([^()]*)\)([^()]*) \)/\2(\3)\4(\5)\6(\7)\8/' -e 's/(UN)?LIKELY\( ([^()]*)\(([^()]*)\(([^()]*)\)([^()]*)\)([^()]*) \)/\2(\3(\4)\5)\6/' $f; done

Just check then via grep -R LIKELY that no (UN)LIKELY macro remains. Some could in a few complex cases and have to be fixed by hand.

Edited by Sebastien Ponce

Merge request reports

Loading