Skip to content

Commit

Permalink
cppcheck: pass const string parameter by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
dekarl committed Jul 19, 2013
1 parent 2af820c commit 2fb13c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mythzoneminder/mythzmserver/zmserver.cpp
Expand Up @@ -363,7 +363,7 @@ bool ZMServer::processRequest(char* buf, int nbytes)
return false;
}

bool ZMServer::send(const string s) const
bool ZMServer::send(const string &s) const
{
// send length
uint32_t len = s.size();
Expand All @@ -381,7 +381,7 @@ bool ZMServer::send(const string s) const
return true;
}

bool ZMServer::send(const string s, const unsigned char *buffer, int dataLen) const
bool ZMServer::send(const string &s, const unsigned char *buffer, int dataLen) const
{
// send length
uint32_t len = s.size();
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythzoneminder/mythzmserver/zmserver.h
Expand Up @@ -158,8 +158,8 @@ class ZMServer

private:
string getZMSetting(const string &setting);
bool send(const string s) const;
bool send(const string s, const unsigned char *buffer, int dataLen) const;
bool send(const string &s) const;
bool send(const string &s, const unsigned char *buffer, int dataLen) const;
void sendError(string error);
void getMonitorList(void);
void initMonitor(MONITOR *monitor);
Expand Down

0 comments on commit 2fb13c8

Please sign in to comment.