diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-13 07:33:50 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-13 07:33:50 -0500 |
commit | c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73 (patch) | |
tree | 16db010aa87c0bd37a718038b00fe1e28b7bd061 /hscript/network.hh | |
parent | 2eeea474af5a405622c038d93f7a466789114ffe (diff) | |
download | horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.gz horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.bz2 horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.tar.xz horizon-c6b3e345b4e9c6e8797e2b0e1e2b31eca4d62b73.zip |
hscript: Pass data by reference
Diffstat (limited to 'hscript/network.hh')
-rw-r--r-- | hscript/network.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hscript/network.hh b/hscript/network.hh index 282429b..179346e 100644 --- a/hscript/network.hh +++ b/hscript/network.hh @@ -23,7 +23,7 @@ class Network : public BooleanKey { private: Network(int _line, bool _value) : BooleanKey(_line, _value) {} public: - 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 execute(ScriptOptions) const override; }; @@ -46,12 +46,12 @@ private: const uint8_t _prefix; const std::string _gw; - NetAddress(const int _line, const std::string _i, const AddressType _t, - const std::string _a, const uint8_t _p, const std::string _g) : + NetAddress(const int _line, const std::string &_i, const AddressType &_t, + const std::string &_a, const uint8_t _p, const std::string &_g) : Key(_line), _iface(_i), _type(_t), _address(_a), _prefix(_p), _gw(_g) {} public: - static Key *parseFromData(const std::string data, int lineno, int *errors, + static Key *parseFromData(const std::string &data, int lineno, int *errors, int *warnings); /*! Retrieve the interface to which this 'netaddress' key is associated. */ |