From 922412f5dc975b423757c1e248eac2813e48acb2 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 10 Oct 2021 18:57:13 +0200 Subject: Move some common functions to util.cc --- src/task_so.cc | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/task_so.cc') diff --git a/src/task_so.cc b/src/task_so.cc index ce6e868..f3e1937 100644 --- a/src/task_so.cc +++ b/src/task_so.cc @@ -9,23 +9,7 @@ #include "libctor.h" #include "settings.h" #include "execute.h" - -namespace -{ -std::string readFile(const std::string &fileName) -{ - std::ifstream ifs(fileName.c_str(), - std::ios::in | std::ios::binary | std::ios::ate); - - std::ifstream::pos_type fileSize = ifs.tellg(); - ifs.seekg(0, std::ios::beg); - - std::vector bytes(fileSize); - ifs.read(bytes.data(), fileSize); - - return std::string(bytes.data(), fileSize); -} -} // namespace :: +#include "util.h" TaskSO::TaskSO(const BuildConfiguration& config, const Settings& settings, -- cgit v1.2.3