U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Misssing pick in implementation of AMap<K, T, V>::Put(const K& k, T&& x)
Misssing pick in implementation of AMap<K, T, V>::Put(const K& k, T&& x) [message #46959] Thu, 29 September 2016 14:03 Go to next message
busiek is currently offline  busiek
Messages: 71
Registered: February 2011
Location: Poland
Member
Noticed missing pick. Simple patch:
diff --git a/uppsrc/Core/Map.hpp b/uppsrc/Core/Map.hpp
index 82877aa..d1b5eb0 100644
--- a/uppsrc/Core/Map.hpp
+++ b/uppsrc/Core/Map.hpp
@@ -465,7 +465,7 @@ int AMap<K, T, V>::Put(const K& k, T&& x)
 {
        int i = key.Put(k);
        if(i < value.GetCount())
-               value[i] = x;
+               value[i] = pick(x);
        else {
                ASSERT(i == value.GetCount());
                value.Add(pick(x));

Re: Misssing pick in implementation of AMap<K, T, V>::Put(const K& k, T&& x) [message #46963 is a reply to message #46959] Fri, 30 September 2016 14:46 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Thanks!

Mirek
Previous Topic: Xmlize - need help
Next Topic: PromptOK(GetCurrentDirectory());
Goto Forum:
  


Current Time: Mon Apr 27 22:55:12 GMT+2 2026

Total time taken to generate the page: 0.00612 seconds