From be10d6a2c1b646ce3cc67bab2896dd3720a80e64 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 9 Oct 2013 20:18:07 +0200 Subject: improve inserting into (allow|confirm)ed_pubkeys --- ssh-agent-filter.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index b094b2c..16d6f03 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -245,7 +245,7 @@ void setup_filters () { if (debug) std::clog << "key allowed by matching comment" << std::endl; } - if (allow) allowed_pubkeys.insert(std::move(key)); + if (allow) allowed_pubkeys.emplace(std::move(key)); else { bool confirm{false}; @@ -266,7 +266,7 @@ void setup_filters () { if (debug) std::clog << "key allowed with confirmation by catch-all (-A)" << std::endl; } - if (confirm) confirmed_pubkeys.emplace(std::move(key), comment); + if (confirm) confirmed_pubkeys.emplace(std::move(key), std::move(comm)); } if (debug) std::clog << std::endl; -- cgit v1.2.3