Skip to content

Commit

Permalink
call by const reference for string values
Browse files Browse the repository at this point in the history
  • Loading branch information
kfb77 committed Aug 9, 2020
1 parent f078fff commit ef700a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions epgsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SearchTimer
tChannelID ChannelMax() const { return m_channelMax; }
void SetChannelMax(tChannelID channelMax) { m_channelMax = channelMax; }
std::string ChannelText() const { return m_channels; }
void SetChannelText(std::string channels) { m_channels = channels; }
void SetChannelText(const std::string& channels) { m_channels = channels; }
int UseAsSearchTimer() const { return m_useAsSearchtimer; }
void SetUseAsSearchTimer(int useAsSearchtimer) { m_useAsSearchtimer = useAsSearchtimer; }
bool UseDuration() const { return m_useDuration; }
Expand Down Expand Up @@ -101,7 +101,7 @@ class SearchTimer
bool UseExtEPGInfo() const { return m_useExtEPGInfo; }
void SetUseExtEPGInfo(bool useExtEPGInfo) { m_useExtEPGInfo = useExtEPGInfo; }
std::vector< std::string > ExtEPGInfo() const { return m_ExtEPGInfo; }
void SetExtEPGInfo(std::vector< std::string > ExtEPGInfo) { m_ExtEPGInfo = ExtEPGInfo; }
void SetExtEPGInfo(const std::vector< std::string >& ExtEPGInfo) { m_ExtEPGInfo = ExtEPGInfo; }
bool AvoidRepeats() const { return m_avoidrepeats; }
void SetAvoidRepeats(bool avoidrepeats) { m_avoidrepeats = avoidrepeats; }
int AllowedRepeats() const { return m_allowedrepeats; }
Expand Down
2 changes: 1 addition & 1 deletion users.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cUser::cUser(int ID, const std::string& Name, const std::string& Password)
SetPassword(Password);
}

void cUser::SetPassword(const std::string Password)
void cUser::SetPassword(const std::string& Password)
{
ostringstream passwordStr;
passwordStr << Password.size() << "|" << MD5Hash(Password);
Expand Down
4 changes: 2 additions & 2 deletions users.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class cUser : public cListObject {
int GetPasswordLength() const;
std::string const GetMD5HashPassword() const;
void SetId(int Id) { m_ID = Id; }
void SetName(const std::string Name) { m_Name = Name; }
void SetPassword(const std::string Password);
void SetName(const std::string& Name) { m_Name = Name; }
void SetPassword(const std::string& Password);
void SetUserrights(int Userrights) { m_Userrights = Userrights; }
bool HasRightTo(eUserRights right);
static bool CurrentUserHasRightTo(eUserRights right);
Expand Down

0 comments on commit ef700a9

Please sign in to comment.