[GeoMechanicsApplication] Moved function from member to a function in an anonymous namespace#14596
[GeoMechanicsApplication] Moved function from member to a function in an anonymous namespace#14596rfaasse wants to merge 1 commit into
Conversation
|
|
||
| using namespace Kratos; | ||
|
|
||
| void CheckElement(Element& rElement, const std::string& rModelPartName, const ProcessInfo& rProcessInfo) |
There was a problem hiding this comment.
FYI @markelov208, I didn't think about this when reviewing #14581, but I was triggered when I saw the suggestion by clang-tidy to make the function static, as according to the C++ Core Guidelines, it is a good idea to move these kinds of internal functions (that are never needed outside of the source file) to an unnamed namespace instead of having it as a static private function.
avdg81
left a comment
There was a problem hiding this comment.
Hi Richard,
Thanks a lot for addressing the issue found by clang-tidy. I have no further comments or suggestions.
Thanks for the quick review, I will wait untill Gennady is available to have quick look (it's not that urgent), since it's code that was changed last week in #14581 |
📝 Description
Clang-tidy mentioned this function could be made static. As it would become a private static function (therefore never needed outside of the class and not needing members), it could be moved to a function in an unnamed/anonymous namespace, as per the C++ Core Guidelines