From 4793c0875dcb82151e1c2d7f38964e738f20f056 Mon Sep 17 00:00:00 2001 From: наб Date: Tue, 12 Nov 2024 17:59:13 +0100 Subject: apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_view --- apt-pkg/acquire-item.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ab3761749..12292eb28 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -5,7 +5,7 @@ Acquire Item - Item to acquire Each item can download to exactly one file at a time. This means you - cannot create an item that fetches two uri's to two files at the same + cannot create an item that fetches two uri's to two files at the same time. The pkgAcqIndex class creates a second class upon instantiation to fetch the other index files because of this. @@ -2389,7 +2389,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ string hash; unsigned long long size; - std::stringstream ss(tmp.to_string()); + std::istringstream ss(std::string{tmp}); // TODO: replace with std::string_view_stream in C++23 ss.imbue(posix); ss >> hash >> size; if (unlikely(hash.empty() == true)) @@ -2459,7 +2459,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ string hash, filename; unsigned long long size; - std::stringstream ss(tmp.to_string()); + std::stringstream ss(std::string{tmp}); // TODO: replace with std::string_view_stream in C++23 ss.imbue(posix); while (ss >> hash >> size >> filename) @@ -2516,7 +2516,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ string hash, filename; unsigned long long size; - std::stringstream ss(tmp.to_string()); + std::stringstream ss(std::string{tmp}); // TODO: replace with std::string_view_stream in C++23 ss.imbue(posix); while (ss >> hash >> size >> filename) @@ -2554,7 +2554,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ string hash, filename; unsigned long long size; - std::stringstream ss(tmp.to_string()); + std::stringstream ss(std::string{tmp}); // TODO: replace with std::string_view_stream in C++23 ss.imbue(posix); // FIXME: all of pdiff supports only .gz compressed patches @@ -2824,7 +2824,7 @@ void pkgAcqIndexDiffs::Failed(string const &Message,pkgAcquire::MethodConfig con void pkgAcqIndexDiffs::Finish(bool allDone) { if(Debug) - std::clog << "pkgAcqIndexDiffs::Finish(): " + std::clog << "pkgAcqIndexDiffs::Finish(): " << allDone << " " << Desc.URI << std::endl; @@ -3254,7 +3254,7 @@ void pkgAcqIndex::Done(string const &Message, { Item::Done(Message,Hashes,Cfg); - switch(Stage) + switch(Stage) { case STAGE_DOWNLOAD: StageDownloadDone(Message); -- cgit v1.2.3-70-g09d2