Remove parse_filename overload and use a default parameter

This commit is contained in:
Maxime Coste 2018-03-25 07:55:39 +11:00
parent 3fe93db610
commit 81f605709c
2 changed files with 2 additions and 8 deletions

View File

@ -58,11 +58,6 @@ String parse_filename(StringView filename, StringView buf_dir)
return filename.str(); return filename.str();
} }
String parse_filename(StringView filename)
{
return parse_filename(filename, {});
}
std::pair<StringView, StringView> split_path(StringView path) std::pair<StringView, StringView> split_path(StringView path)
{ {
auto it = find(path | reverse(), '/'); auto it = find(path | reverse(), '/');

View File

@ -3,6 +3,7 @@
#include "array_view.hh" #include "array_view.hh"
#include "meta.hh" #include "meta.hh"
#include "string.hh"
#include "units.hh" #include "units.hh"
#include "vector.hh" #include "vector.hh"
@ -14,14 +15,12 @@ namespace Kakoune
class Buffer; class Buffer;
class String; class String;
class StringView;
class Regex; class Regex;
using CandidateList = Vector<String, MemoryDomain::Completion>; using CandidateList = Vector<String, MemoryDomain::Completion>;
// parse ~/ and %/ in filename and returns the translated filename // parse ~/ and %/ in filename and returns the translated filename
String parse_filename(StringView filename, StringView buf_dir); String parse_filename(StringView filename, StringView buf_dir = {});
String parse_filename(StringView filename);
String real_path(StringView filename); String real_path(StringView filename);
String compact_path(StringView filename); String compact_path(StringView filename);