Commit 860107af authored by phcoder's avatar phcoder
Browse files

Remove unnecessarry object copying

parent d1673293
......@@ -74,14 +74,14 @@ std::vector<std::string> Loader::loadLines(T& input)
void Loader::loadFile(const std::string& path, Machine& dest)
auto stream = std::ifstream(path);
std::ifstream stream(path);
load(loadLines(stream), dest);
void Loader::loadRaw(const std::string& data, Machine& dest)
auto stream = std::stringstream(data);
std::stringstream stream(data);
load(loadLines(stream), dest);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment