Closed KevinCybura closed 6 years ago
For reference, here is the report from me linting the code. I'm only including the stuff relevant to this PR:
/home/connor/Dropbox/OpenBVE2/OpenBVE2/libparsers/src/xml/dynamic_background.cpp:14:47: warning: the parameter 'input_string' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
std::string input_string,
~~~ ^
const &
/home/connor/Dropbox/OpenBVE2/OpenBVE2/libparsers/src/xml/route_marker.cpp:184:6: warning: do not use 'else' after 'return' [readability-else-after-return]
else {
^~~~~~
/home/connor/Dropbox/OpenBVE2/OpenBVE2/libparsers/src/xml/route_marker.cpp:310:41: warning: the parameter 'input_string' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
std::string input_string,
~~~ ^
const &
/home/connor/Dropbox/OpenBVE2/OpenBVE2/libparsers/src/xml/dynamic_lighting.cpp:9:48: warning: the parameter 'input_string' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
std::string input_string,
~~~ ^
const &
The warnings about the unnecessary value param are actually wrong, the linter isn't following the constness all the way down. I have commented those out, the only relevant thing that shows up is that if you return inside of an if statement, don't use an else.
I'm going to fix all of these, but something to be aware of.
Pull Request Test Coverage Report for Build 150
💛 - Coveralls