summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 17:59:13 +0100
committerнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 20:36:19 +0100
commit4793c0875dcb82151e1c2d7f38964e738f20f056 (patch)
treecfe6228664c2dbe5574c382cf82ade0e210ebe77
parentb0da8ee5708026fa02058f21106bd12a56e27163 (diff)
apt-pkg/acquire-item.cc: prepare for APT::StringView -> std::string_view
-rw-r--r--apt-pkg/acquire-item.cc14
1 files changed, 7 insertions, 7 deletions
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);