pass by reference

Origin commit data
------------------
Commit: a918ca56b6
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-04-20 (Wed, 20 Apr 2016)
This commit is contained in:
Jacek Jendrzej
2016-04-20 12:52:16 +02:00
parent 0493e5c8f8
commit f964a56c0d
3 changed files with 4 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ class CHDDMenuHandler : public CMenuTarget
std::vector<hdd_s> hdd_list;
struct cmp_hdd_by_name: public binary_function <const struct hdd_s, const struct hdd_s, bool>
{
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());
};

View File

@@ -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;

View File

@@ -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);