mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 12:49:13 +01:00
refactor(sonar): pass expensive-to-copy parameters by const reference (cpp:S1238)
Signatures declared in files touched by PR 206 (Driver.h, EU07.cpp) and virtual overrides are left unchanged.
This commit is contained in:
@@ -55,7 +55,7 @@ to_string( comparison_operator const Operator ) {
|
||||
|
||||
inline
|
||||
comparison_pass
|
||||
comparison_pass_from_string( std::string const Input ) {
|
||||
comparison_pass_from_string( std::string const &Input ) {
|
||||
using enum comparison_pass;
|
||||
if( Input == "all" ) { return all; }
|
||||
else if( Input == "any" ) { return any; }
|
||||
@@ -66,7 +66,7 @@ comparison_pass_from_string( std::string const Input ) {
|
||||
|
||||
inline
|
||||
comparison_operator
|
||||
comparison_operator_from_string( std::string const Input ) {
|
||||
comparison_operator_from_string( std::string const &Input ) {
|
||||
using enum comparison_operator;
|
||||
if( Input == "==" ) { return equal; }
|
||||
else if( Input == "!=" ) { return not_equal; }
|
||||
|
||||
@@ -28,6 +28,6 @@ struct dictionary_source {
|
||||
inline void insert( std::string const &Key, double const Value ) { floats.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, int const Value ) { integers.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, bool const Value ) { bools.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, std::string const Value ) { strings.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, std::vector<glm::vec2> const Value ) { vec2_lists.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, std::string const &Value ) { strings.emplace_back( Key, Value ); }
|
||||
inline void insert( std::string const &Key, std::vector<glm::vec2> const &Value ) { vec2_lists.emplace_back( Key, Value ); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user