summaryrefslogtreecommitdiff
path: root/hscript/disk.hh
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 07:33:50 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 07:33:50 -0500
commitc6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73 (patch)
tree16db010aa87c0bd37a718038b00fe1e28b7bd061 /hscript/disk.hh
parent2eeea474af5a405622c038d93f7a466789114ffe (diff)
downloadhorizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.gz
horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.bz2
horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.xz
horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.zip
hscript: Pass data by reference
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r--hscript/disk.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh
index 36e1e1d..d849e2f 100644
--- a/hscript/disk.hh
+++ b/hscript/disk.hh
@@ -48,9 +48,10 @@ private:
const std::string _mountpoint;
const std::string _opts;
- Mount(int _line, std::string my_block, std::string my_mountpoint,
- std::string my_opts = "") : Key(_line), _block(my_block),
- _mountpoint(my_mountpoint), _opts(my_opts) {}
+ Mount(int _line, const std::string &my_block,
+ const std::string &my_mountpoint, const std::string &my_opts = "") :
+ Key(_line), _block(my_block), _mountpoint(my_mountpoint),
+ _opts(my_opts) {}
public:
/*! Retrieve the block device to which this mount pertains. */
const std::string device() const { return this->_block; }
@@ -59,7 +60,7 @@ public:
/*! Retrieve the mount options for this mount, if any. */
const std::string options() const { return this->_opts; }
- static Key *parseFromData(const std::string data, int lineno, int *errors,
+ static Key *parseFromData(const std::string &data, int lineno, int *errors,
int *warnings);
bool validate(ScriptOptions) const override;
bool execute(ScriptOptions) const override;