mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 15:39:20 +02: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:
@@ -7,7 +7,7 @@
|
||||
#include "utilities/Logs.h"
|
||||
|
||||
#ifdef __unix__
|
||||
piped_proc::piped_proc(std::string cmd, bool write)
|
||||
piped_proc::piped_proc(std::string const &cmd, bool write)
|
||||
{
|
||||
file = popen(cmd.c_str(), write ? "w" : "r");
|
||||
}
|
||||
@@ -34,7 +34,7 @@ size_t piped_proc::write(unsigned char const *buf, size_t len)
|
||||
return fwrite(buf, 1, len, file);
|
||||
}
|
||||
#elif _WIN32
|
||||
piped_proc::piped_proc(std::string cmd, bool write)
|
||||
piped_proc::piped_proc(std::string const &cmd, bool write)
|
||||
{
|
||||
PROCESS_INFORMATION process;
|
||||
STARTUPINFO siStartInfo;
|
||||
|
||||
Reference in New Issue
Block a user