aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/wildcard.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-08 08:44:04 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-08-08 13:55:51 -0700
commit6347988e0af8efd71e38f76b2900e50bb5fec791 (patch)
tree8e2f372349b981799d128874cff8bc720bfb1a0d /src/wildcard.cpp
parentb92acd3cf2d90caf3914d02c21ac5cddea8ec2b4 (diff)
Eliminate wildcard_expand function
Diffstat (limited to 'src/wildcard.cpp')
-rw-r--r--src/wildcard.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/wildcard.cpp b/src/wildcard.cpp
index e178a191..b8d30beb 100644
--- a/src/wildcard.cpp
+++ b/src/wildcard.cpp
@@ -1053,17 +1053,6 @@ void wildcard_expander_t::expand(const wcstring &base_dir, const wchar_t *wc)
}
-static int wildcard_expand(const wchar_t *wc,
- const wcstring &base_dir,
- expand_flags_t flags,
- std::vector<completion_t> *out)
-{
- assert(out != NULL);
- wildcard_expander_t expander(base_dir, wc, flags, out);
- expander.expand(base_dir, wc);
- return expander.status_code();
-}
-
int wildcard_expand_string(const wcstring &wc, const wcstring &base_dir, expand_flags_t flags, std::vector<completion_t> *output)
{
assert(output != NULL);
@@ -1074,5 +1063,8 @@ int wildcard_expand_string(const wcstring &wc, const wcstring &base_dir, expand_
{
return 0;
}
- return wildcard_expand(wc.c_str(), base_dir, flags, output);
+
+ wildcard_expander_t expander(base_dir, wc.c_str(), flags, output);
+ expander.expand(base_dir, wc.c_str());
+ return expander.status_code();
}