The goal of this PR is to inline some variables to a return in case the declared variable is immediately returned.
Rationale
Intermediate variables can be useful if they are used later as a parameter or condition, and their name can provide context for what the variable represents.
If returned by a function, the function name is present to indicate the type of result.
I took the liberty of removing these intermediate variables because they don't really add value.
Returning the result directly reduces the mental load of reading the function by shortening the code and removing an unnecessary variable.
Change Description
The goal of this PR is to inline some variables to a
return
in case the declared variable is immediately returned.Rationale
Intermediate variables can be useful if they are used later as a parameter or condition, and their name can provide context for what the variable represents. If returned by a function, the function name is present to indicate the type of result.
I took the liberty of removing these intermediate variables because they don't really add value.
Returning the result directly reduces the mental load of reading the function by shortening the code and removing an unnecessary variable.
Testing/Review Recommendations
void
Future Work
void