diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2025-01-23 21:04:49 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-14 19:45:12 +0100 |
| commit | c3b35fb1c8f12786bd3e68bd260e0488e17806d9 (patch) | |
| tree | bccf54e8a1a77127a593f772833c8717e7f4cdf2 | |
| parent | e3ec59bc982ca9dfb6bf6a322ec4abac907eb152 (diff) | |
Take const& in flNotFile()
| -rw-r--r-- | apt-pkg/contrib/fileutl.cc | 2 | ||||
| -rw-r--r-- | apt-pkg/contrib/fileutl.h | 2 |
2 files changed, 2 insertions, 2 deletions
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); |
