From 97553e635d2265ec4aad96b00b1fd72d98437f15 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 17 Jun 2019 18:28:52 +0200 Subject: RFC1123StrToTime: Accept const std::string& as first argument We are converting to std::string anyway by passing to istringstream, and this removes the need for .c_str() in callers. --- apt-pkg/deb/debmetaindex.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index fef58f543..71e047257 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -528,7 +528,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro AuthPossible = true; std::string const StrDate = Section.FindS("Date"); - if (RFC1123StrToTime(StrDate.c_str(), Date) == false) + if (RFC1123StrToTime(StrDate, Date) == false) { _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); Date = 0; @@ -567,7 +567,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro // if we have a Valid-Until header in the Release file, use it as default if (StrValidUntil.empty() == false) { - if (RFC1123StrToTime(StrValidUntil.c_str(), ValidUntil) == false) + if (RFC1123StrToTime(StrValidUntil, ValidUntil) == false) { if (ErrorText != NULL) strprintf(*ErrorText, _("Invalid '%s' entry in Release file %s"), "Valid-Until", Filename.c_str()); -- cgit v1.2.3-18-g5258