From c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 13 Oct 2019 07:33:50 -0500 Subject: hscript: Pass data by reference --- hscript/disk.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'hscript/disk.hh') 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; -- cgit v1.2.3-60-g2f50