From 7f8ca38462f0e207c09b6bd903f0952dcad1d52b Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 11 Jan 2022 14:35:34 +0100 Subject: [PATCH] Manager: Use constructor over auto --- src/machine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index 70ef712..b7daeea 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -13,10 +13,9 @@ Machine::Machine(s) { - auto osRelease = Util::File("/etc/os-release"); - auto stream = std::istringstream(osRelease.data()); - std::string line; - while (std::getline(stream, line)) { + Util::File osRelease("/etc/os-release"); + std::istringstream stream(osRelease.data()); + for (std::string line; std::getline(stream, line);) { if (line.find("ID=") == 0) { m_distroId = line.substr(3); }