path: refactor for less indentation
This just switches the statements in a way that it reduces the overall indentation. The function has a very deep indentation in general and this should improve the readability.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines