summaryrefslogtreecommitdiff
path: root/hscript/network.cc
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/network.cc
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/network.cc')
-rw-r--r--hscript/network.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/hscript/network.cc b/hscript/network.cc
index f14381f..3dc5f1e 100644
--- a/hscript/network.cc
+++ b/hscript/network.cc
@@ -17,7 +17,7 @@
using namespace Horizon::Keys;
-Key *Network::parseFromData(const std::string data, int lineno, int *errors,
+Key *Network::parseFromData(const std::string &data, int lineno, int *errors,
int *warnings) {
bool value;
if(!BooleanKey::parse(data, "installfile:" + std::to_string(lineno),
@@ -32,7 +32,7 @@ bool Network::execute(ScriptOptions) const {
return false;
}
-Key *NetAddress::parseFromData(const std::string data, int lineno, int *errors,
+Key *NetAddress::parseFromData(const std::string &data, int lineno, int *errors,
int *warnings) {
long elements = std::count(data.cbegin(), data.cend(), ' ') + 1;
std::string::size_type type_pos, addr_pos, prefix_pos, gw_pos, next_end;