diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-10-13 13:12:33 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-10-13 13:14:23 +0100 |
| commit | fa85f0fc32b105bef5948585a7d7a38c2910854b (patch) | |
| tree | 62df5d4c99b3ae89274c848895fa94445f870edb /src/shell_manager.cc | |
| parent | b6f2b872b003639e3a596a2e4a1b817529ebd729 (diff) | |
Refactor regex uses, do not reference boost except in regex.hh
Diffstat (limited to 'src/shell_manager.cc')
| -rw-r--r-- | src/shell_manager.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shell_manager.cc b/src/shell_manager.cc index 08c34160..e105f102 100644 --- a/src/shell_manager.cc +++ b/src/shell_manager.cc @@ -87,8 +87,8 @@ String ShellManager::pipe(StringView input, dup2(error_pipe[1], 2); close(error_pipe[1]); dup2(write_pipe[0], 0); close(write_pipe[0]); - boost::regex_iterator<StringView::iterator> it(cmdline.begin(), cmdline.end(), env_var_regex); - boost::regex_iterator<StringView::iterator> end; + RegexIterator<StringView::iterator> it(cmdline.begin(), cmdline.end(), env_var_regex); + RegexIterator<StringView::iterator> end; while (it != end) { @@ -145,8 +145,7 @@ String ShellManager::get_val(StringView name, const Context& context) const auto env_var = std::find_if( m_env_vars.begin(), m_env_vars.end(), [&](const std::pair<Regex, EnvVarRetriever>& pair) - { return boost::regex_match(name.begin(), name.end(), - pair.first); }); + { return regex_match(name.begin(), name.end(), pair.first); }); if (env_var == m_env_vars.end()) throw runtime_error("no such env var: " + name); |
