From c3b35fb1c8f12786bd3e68bd260e0488e17806d9 Mon Sep 17 00:00:00 2001 From: наб Date: Thu, 23 Jan 2025 21:04:49 +0100 Subject: Take const& in flNotFile() --- apt-pkg/contrib/fileutl.cc | 2 +- apt-pkg/contrib/fileutl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 76435bec8..4e72d8462 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -682,7 +682,7 @@ string_view flNotDir(string_view File) // flNotFile - Strip the file from the directory name /*{{{*/ // --------------------------------------------------------------------- /* Result ends in a / */ -string flNotFile(string File) +string flNotFile(string const &File) { string::size_type Res = File.rfind('/'); if (Res == string::npos) diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 1f31447dc..edf18ec2b 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -253,7 +253,7 @@ APT_PUBLIC bool DropPrivileges(); // File string manipulators APT_PUBLIC std::string_view flNotDir(std::string_view File); -APT_PUBLIC std::string flNotFile(std::string File); +APT_PUBLIC std::string flNotFile(std::string const &File); // XXX: this should take a string_view, but right now that causes more type problems than it solves APT_PUBLIC std::string flNoLink(std::string File); APT_PUBLIC std::string_view flExtension(std::string_view File); APT_PUBLIC std::string flCombine(std::string Dir,std::string File); -- cgit v1.2.3-70-g09d2