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/network.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hscript/network.cc') 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; -- cgit v1.2.3-60-g2f50