From 81f605709c51fc2818caae202dd27212fb9bed71 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 25 Mar 2018 07:55:39 +1100 Subject: [PATCH] Remove parse_filename overload and use a default parameter --- src/file.cc | 5 ----- src/file.hh | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/file.cc b/src/file.cc index 49a1e6ab..6fa6d19f 100644 --- a/src/file.cc +++ b/src/file.cc @@ -58,11 +58,6 @@ String parse_filename(StringView filename, StringView buf_dir) return filename.str(); } -String parse_filename(StringView filename) -{ - return parse_filename(filename, {}); -} - std::pair split_path(StringView path) { auto it = find(path | reverse(), '/'); diff --git a/src/file.hh b/src/file.hh index 5986ab2f..f5a8cf0b 100644 --- a/src/file.hh +++ b/src/file.hh @@ -3,6 +3,7 @@ #include "array_view.hh" #include "meta.hh" +#include "string.hh" #include "units.hh" #include "vector.hh" @@ -14,14 +15,12 @@ namespace Kakoune class Buffer; class String; -class StringView; class Regex; using CandidateList = Vector; // parse ~/ and %/ in filename and returns the translated filename -String parse_filename(StringView filename, StringView buf_dir); -String parse_filename(StringView filename); +String parse_filename(StringView filename, StringView buf_dir = {}); String real_path(StringView filename); String compact_path(StringView filename);