From: Alberto Gonzalez Date: Tue, 21 Apr 2020 17:17:47 +0000 (+0000) Subject: kernel: Rename arguments to rvalue-reference-accepting functions. X-Git-Tag: working-ls180~598^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=746c29b1716b7eac4f4be0eded64e7aa05a6682d;p=yosys.git kernel: Rename arguments to rvalue-reference-accepting functions. --- diff --git a/kernel/hashlib.h b/kernel/hashlib.h index b0e946072..ad2ed6033 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -756,14 +756,14 @@ protected: return entries.size() - 1; } - int do_insert(K &&value, int &hash) + int do_insert(K &&rvalue, int &hash) { if (hashtable.empty()) { - entries.emplace_back(std::forward(value), -1); + entries.emplace_back(std::forward(rvalue), -1); do_rehash(); - hash = do_hash(value); + hash = do_hash(rvalue); } else { - entries.emplace_back(std::forward(value), hashtable[hash]); + entries.emplace_back(std::forward(rvalue), hashtable[hash]); hashtable[hash] = entries.size() - 1; } return entries.size() - 1; @@ -861,13 +861,13 @@ public: return std::pair(iterator(this, i), true); } - std::pair insert(K &&value) + std::pair insert(K &&rvalue) { - int hash = do_hash(value); - int i = do_lookup(value, hash); + int hash = do_hash(rvalue); + int i = do_lookup(rvalue, hash); if (i >= 0) return std::pair(iterator(this, i), false); - i = do_insert(std::forward(value), hash); + i = do_insert(std::forward(rvalue), hash); return std::pair(iterator(this, i), true); }