mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-01 09:12:08 +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:
@@ -226,7 +226,7 @@ void sn_utils::s_uint8(std::ostream &s, uint8_t v)
|
||||
s.write((char*)&v, 1);
|
||||
}
|
||||
|
||||
void sn_utils::s_str(std::ostream &s, std::string v)
|
||||
void sn_utils::s_str(std::ostream &s, std::string const &v)
|
||||
{
|
||||
const char* buf = v.c_str();
|
||||
s.write(buf, v.size() + 1);
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
static void ls_float32(std::ostream&, float);
|
||||
static void ls_float64(std::ostream&, double);
|
||||
static void s_uint8(std::ostream&, uint8_t);
|
||||
static void s_str(std::ostream&, std::string);
|
||||
static void s_str(std::ostream&, std::string const &);
|
||||
static void s_bool(std::ostream&, bool);
|
||||
static void s_dvec3(std::ostream&, glm::dvec3 const &);
|
||||
static void s_vec3(std::ostream&, glm::vec3 const &);
|
||||
|
||||
Reference in New Issue
Block a user