diff --git a/src/gui/hdd_menu.h b/src/gui/hdd_menu.h index 899d0f6e5..13a320e62 100644 --- a/src/gui/hdd_menu.h +++ b/src/gui/hdd_menu.h @@ -66,7 +66,7 @@ class CHDDMenuHandler : public CMenuTarget std::vector hdd_list; struct cmp_hdd_by_name: public binary_function { - bool operator() (const struct hdd_s c1, const struct hdd_s c2) + bool operator() (const struct hdd_s &c1, const struct hdd_s &c2) { return std::lexicographical_compare(c1.devname.begin(), c1.devname.end(), c2.devname.begin(), c2.devname.end()); }; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index a15b51eab..d2c36c0f6 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -2258,7 +2258,7 @@ CMenuSeparator::CMenuSeparator(const int Type, const neutrino_locale_t Text, boo nameString = ""; } -CMenuSeparator::CMenuSeparator(const int Type, const std::string Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic) +CMenuSeparator::CMenuSeparator(const int Type, const std::string &Text, bool IsStatic) : CMenuItem(false, CRCInput::RC_nokey, NULL, NULL, IsStatic) { type = Type; name = NONEXISTANT_LOCALE; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 97bf7bd26..104078179 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -190,7 +190,7 @@ class CMenuItem : public CComponentsSignals virtual int isMenueOptionChooser(void) const{return 0;} void setHint(const char * const icon, const neutrino_locale_t text) { hintIcon = (icon && *icon) ? icon : NULL; hint = text; } - void setHint(const char * const icon, const std::string text) { hintIcon = (icon && *icon) ? icon : NULL; hintText = text; } + void setHint(const char * const icon, const std::string &text) { hintIcon = (icon && *icon) ? icon : NULL; hintText = text; } void setLua(lua_State *_luaState, std::string &_luaAction, std::string &_luaId) { luaState = _luaState; luaAction = _luaAction; luaId = _luaId; }; virtual const char *getName(); @@ -226,7 +226,7 @@ class CMenuSeparator : public CMenuItem CMenuSeparator(const int Type = 0, const neutrino_locale_t Text = NONEXISTANT_LOCALE, bool IsStatic = false); - CMenuSeparator(const int Type, const std::string Text, bool IsStatic = false); + CMenuSeparator(const int Type, const std::string &Text, bool IsStatic = false); virtual ~CMenuSeparator(){} int paint(bool selected=false);