Add rvalue-reference-accepting `entry_t` constructor for `pool`.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 20 Apr 2020 05:37:10 +0000 (05:37 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 20 Apr 2020 05:37:10 +0000 (05:37 +0000)
kernel/hashlib.h

index 1a21494a7bb3b8115e44eba4ba1ae1e55cc84139..b0e946072cf49a49c6f7b95e09981c9257489437 100644 (file)
@@ -642,6 +642,7 @@ protected:
 
                entry_t() { }
                entry_t(const K &udata, int next) : udata(udata), next(next) { }
+               entry_t(K &&udata, int next) : udata(std::move(udata)), next(next) { }
        };
 
        std::vector<int> hashtable;