diff options
author | Peter Collingbourne <pcc@google.com> | 2020-01-16 23:42:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-01-16 23:42:58 +0000 |
commit | c7998b65098ae26a3b0386c12fdae20864d3c256 (patch) | |
tree | 1fca733b51a9c7d7de11caa04f8d11a3cf38fd7c | |
parent | 5b973e7b73266f3267039b496eb395253f3ff39f (diff) | |
parent | ad8f4232693b436b52e4771916c4f82bd055d78e (diff) | |
download | platform_system_libhidl-c7998b65098ae26a3b0386c12fdae20864d3c256.tar.gz platform_system_libhidl-c7998b65098ae26a3b0386c12fdae20864d3c256.tar.bz2 platform_system_libhidl-c7998b65098ae26a3b0386c12fdae20864d3c256.zip |
Merge "Change ConcurrentMap::setLocked() to take a const K& instead of K&&."
-rw-r--r-- | transport/include/hidl/ConcurrentMap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/transport/include/hidl/ConcurrentMap.h b/transport/include/hidl/ConcurrentMap.h index 329752ca..57b28c50 100644 --- a/transport/include/hidl/ConcurrentMap.h +++ b/transport/include/hidl/ConcurrentMap.h @@ -66,8 +66,8 @@ public: std::unique_lock<std::mutex> lock() { return std::unique_lock<std::mutex>(mMutex); } - void setLocked(K&& k, V&& v) { mMap[std::forward<K>(k)] = std::forward<V>(v); } - void setLocked(K&& k, const V& v) { mMap[std::forward<K>(k)] = v; } + void setLocked(const K& k, V&& v) { mMap[k] = std::forward<V>(v); } + void setLocked(const K& k, const V& v) { mMap[k] = v; } const V& getLocked(const K& k, const V& def) const { const_iterator iter = mMap.find(k); |