use pass by reference

Origin commit data
------------------
Commit: 5ef5580df6
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-21 (Tue, 21 Jan 2020)
This commit is contained in:
Jacek Jendrzej
2020-01-21 22:01:42 +01:00
committed by vanhofen
parent 69df81ed41
commit f79b7336a0
3 changed files with 4 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ extern "C" {
extern cVideo *videoDecoder;
/* constructor, defaults is empty fname and CScreenShot::FORMAT_JPG format */
CScreenShot::CScreenShot(const std::string fname, screenshot_format_t fmt)
CScreenShot::CScreenShot(const std::string &fname, screenshot_format_t fmt)
{
format = fmt;
filename = fname;

View File

@@ -78,7 +78,7 @@ class CScreenShot
#endif // SCREENSHOT_INTERNAL
public:
CScreenShot(const std::string fname = "", screenshot_format_t fmt = CScreenShot::FORMAT_JPG);
CScreenShot(const std::string &fname = "", screenshot_format_t fmt = CScreenShot::FORMAT_JPG);
~CScreenShot();
void MakeFileName(const t_channel_id channel_id);

View File

@@ -378,7 +378,7 @@ private:
int exec(CMenuTarget* parent);
int isMenueOptionChooser(void) const{return 1;}
int getWidth(void);
void setNumberFormat(std::string format) { numberFormat = format; }
void setNumberFormat(const std::string &format) { numberFormat = format; }
void setNumberFormat(std::string (*fun)(int)) { numberFormatFunction = fun; }
void setNumericInput(bool _numeric_input) { numeric_input = _numeric_input; }
void setLocalizedValue(int special_value, neutrino_locale_t special_value_name)
@@ -688,11 +688,9 @@ class CPINProtection
virtual CMenuTarget* getParent() = 0;
neutrino_locale_t title, hint;
public:
CPINProtection(std::string &validpin)
CPINProtection(std::string &validpin): title( LOCALE_PINPROTECTION_HEAD),hint(NONEXISTANT_LOCALE)
{
validPIN = &validpin;
hint = NONEXISTANT_LOCALE;
title = LOCALE_PINPROTECTION_HEAD;
};
virtual ~CPINProtection(){}
virtual void setTitle(neutrino_locale_t Title){title = Title;};