Refactor: helper function functionTypeToString()#5889
Refactor: helper function functionTypeToString()#5889firewave merged 3 commits intocppcheck-opensource:mainfrom
Conversation
| std::cout << std::endl; | ||
| } | ||
|
|
||
| static std::string functionTypeToString(Function::Type type) |
There was a problem hiding this comment.
Returning const char* would preserve the previous behavior and would also avoid generate an temporary std::string (not sure if inlining would get rid of that).
There was a problem hiding this comment.
Thing is, there are similar helper functions (scopeTypeToString, accessControlToString) which return std::string. Adjusted and grouped together.
There was a problem hiding this comment.
I also see use of std::endl and std::ostringstream, which probably doesn't help performance either. Or it might just be irrelevant.
There was a problem hiding this comment.
Thing is, there are similar helper functions (
scopeTypeToString,accessControlToString) which returnstd::string. Adjusted and grouped together.
It shouldn't really matter much. Just mentioned it because it changed the behavior.
I also see use of
std::endlandstd::ostringstream, which probably doesn't help performance either. Or it might just be irrelevant.
The most relevant places have already been adjusted. I am not going into profiling again until my other big tasks are finally done and I filed some more upstream tickets about suboptimal code generation.
No description provided.