This one should really be only a refactor with the goal to silence static analysis warnings. clang-14 (trunk) recently added one in commit https://github.com/llvm/llvm-project/commit/f62d18ff140f67a8776a7a3c62a75645d8d540b5 and I expect other tools will offer similar warnings.
Follow up to #1006, which was not a refactor.