From 0b156cd1711a5e27643b941f5a321a62e5a9b628 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 28 Mar 2022 18:05:44 +0200 Subject: Avoid .c_str() on strings feed into pkgTagSection::FindS FindS has a APT::StringView based API nowadays, so we can avoid these explicit calls also allowing us to avoid the std::string in input or output entirely or at least move it a few branches down. --- apt-pkg/edsp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/edsp.cc') diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index b7c0d28d2..6493a4595 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -453,7 +453,7 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres continue; } - decltype(VersionCount) const id = section.FindULL(type.c_str(), VersionCount); + decltype(VersionCount) const id = section.FindULL(type, VersionCount); if (id == VersionCount) { _error->Warning("Unable to parse %s request with id value '%s'!", type.c_str(), section.FindS(type.c_str()).c_str()); continue; -- cgit v1.2.3-70-g09d2