This function seems like a good candidate for `inline`. Also, please put opening curly brackets in new lines for consistency with the rest of the codebase.