diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-25 12:44:21 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-03-25 12:44:21 -0700 |
commit | b520a03c57a510b978ac5ee3382b446b72107669 (patch) | |
tree | d0b279183c14c38309549aa47bf5ab3c4402fd4e /highlight.cpp | |
parent | a4cafaad2e2eabcf3262ae503d616d767c9d0f4d (diff) |
Prefer swap() member function to std::swap. We were hitting the
inefficient generic std::swap for some derived types.
Diffstat (limited to 'highlight.cpp')
-rw-r--r-- | highlight.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/highlight.cpp b/highlight.cpp index eaaec750..87985ae6 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -350,7 +350,7 @@ bool plain_statement_get_expanded_command(const wcstring &src, const parse_node_ if (expand_one(cmd, EXPAND_SKIP_CMDSUBST | EXPAND_SKIP_VARIABLES | EXPAND_SKIP_JOBS)) { /* Success, return the expanded string by reference */ - std::swap(cmd, *out_cmd); + out_cmd->swap(cmd); result = true; } } |