Index: uppsrc/Core/BiCont.h =================================================================== --- uppsrc/Core/BiCont.h (revision 9917) +++ uppsrc/Core/BiCont.h (working copy) @@ -29,8 +29,8 @@ T& AddTail() { return *new(AddTail0()) T; } void AddHead(const T& x) { new(AddHead0()) T(x); } void AddTail(const T& x) { new(AddTail0()) T(x); } - void AddHead(T&& x) { new(AddHead0()) T(x); } - void AddTail(T&& x) { new(AddTail0()) T(x); } + void AddHead(T&& x) { new(AddHead0()) T(pick(x)); } + void AddTail(T&& x) { new(AddTail0()) T(pick(x)); } T& Head() { ASSERT(items > 0); return vector[start]; } T& Tail() { ASSERT(items > 0); return vector[EI()]; } const T& Head() const { ASSERT(items > 0); return vector[start]; } @@ -79,8 +79,8 @@ UPP::Swap(a.alloc, b.alloc); } #ifdef DEPRECATED - void AddHeadPick(T&& x) { new(AddHead0()) T(x); } - void AddTailPick(T&& x) { new(AddTail0()) T(x); } + void AddHeadPick(T&& x) { new(AddHead0()) T(pick(x)); } + void AddTailPick(T&& x) { new(AddTail0()) T(pick(x)); } ConstIterator GetIter(int pos) const { return ConstIterator(*this, pos); } Iterator GetIter(int pos) { return Iterator(*this, pos); } typedef T ValueType; @@ -155,8 +155,8 @@ friend void Swap(BiArray& a, BiArray& b) { UPP::Swap(a.bv, b.bv); } #ifdef DEPRECATED - void AddHeadPick(T&& x) { bv.AddHead(new T(x)); } - void AddTailPick(T&& x) { bv.AddTail(new T(x)); } + void AddHeadPick(T&& x) { bv.AddHead(new T(pick(x))); } + void AddTailPick(T&& x) { bv.AddTail(new T(pick(x))); } ConstIterator GetIter(int pos) const { return ConstIterator(*this, pos); } Iterator GetIter(int pos) { return Iterator(*this, pos); } typedef T ValueType; Index: uppsrc/Core/Callback.h =================================================================== --- uppsrc/Core/Callback.h (revision 9917) +++ uppsrc/Core/Callback.h (working copy) @@ -91,7 +91,7 @@ Event(const Event& src) : fn(src.fn) {} Event& operator=(const Event& src) { fn = src.fn; return *this; } - Event(Fn&& src, int) : fn(src) {} // Helper for callback compatibility code + Event(Fn&& src, int) : fn(pick(src)) {} // Helper for callback compatibility code template Event(F src, int) : fn(src) {} // Helper for callback compatibility code @@ -137,7 +137,7 @@ EventGate(const EventGate& a) : fn(a.fn) {} EventGate& operator=(const EventGate& a) { fn = a.fn; return *this; } - EventGate(Fn&& src, int) : fn(src) {} + EventGate(Fn&& src, int) : fn(pick(src)) {} EventGate& operator=(EventGate&& a) { fn = pick(a.fn); return *this; } EventGate(CNULLer) {} Index: uppsrc/Core/CoWork.h =================================================================== --- uppsrc/Core/CoWork.h (revision 9917) +++ uppsrc/Core/CoWork.h (working copy) @@ -51,7 +51,7 @@ CoWork& operator&(const Callback& cb) { Do(cb); return *this; } CoWork& operator&(const Function& fn) { Do(fn); return *this; } - CoWork& operator&(Function&& fn) { Do(fn); return *this; } + CoWork& operator&(Function&& fn) { Do(pick(fn)); return *this; } void Pipe(int stepi, Function&& lambda); Index: uppsrc/Core/FixedMap.h =================================================================== --- uppsrc/Core/FixedMap.h (revision 9917) +++ uppsrc/Core/FixedMap.h (working copy) @@ -6,7 +6,7 @@ public: T& Add(const K& k, const T& x) { key.Add(k); return value.Add(x); } - T& AddPick(const K& k, T&& x) { key.Add(k); return value.AddPick(x); } + T& AddPick(const K& k, T&& x) { key.Add(k); return value.AddPick(pick(x)); } T& Add(const K& k) { key.Add(k); return value.Add(); } void Finish() { IndexSort(key, value, Less()); Shrink(); } @@ -52,7 +52,7 @@ FixedAMap() {} FixedAMap(const FixedAMap& s, int) : key(s.key, 0), value(s.value, 0) {} - FixedAMap(Vector&& key, V&& val) : key(key), value(val) {} + FixedAMap(Vector&& key, V&& val) : key(pick(key)), value(val) {} typedef ConstIteratorOf ConstIterator; typedef IteratorOf Iterator; @@ -85,7 +85,7 @@ typedef FixedAMap< K, T, Vector, Less > B; public: FixedVectorMap(const FixedVectorMap& s, int) : FixedAMap, Less>(s, 1) {} - FixedVectorMap(Vector&& key, Vector&& val) : FixedAMap, Less>(key, val) {} + FixedVectorMap(Vector&& key, Vector&& val) : FixedAMap, Less>(pick(key), pick(val)) {} FixedVectorMap() {} friend void Swap(FixedVectorMap& a, FixedVectorMap& b) { a.B::Swap(b); } @@ -107,7 +107,7 @@ TT& Create(const K& k, Args... args) { TT *q = new TT(args...); B::key.Add(k); return static_cast(B::value.Add(q)); } FixedArrayMap(const FixedArrayMap& s, int) : FixedAMap, Less>(s, 1) {} - FixedArrayMap(Vector&& ndx, Array&& val) : FixedAMap, Less>(ndx, val) {} + FixedArrayMap(Vector&& ndx, Array&& val) : FixedAMap, Less>(pick(ndx), pick(val)) {} FixedArrayMap() {} friend void Swap(FixedArrayMap& a, FixedArrayMap& b) { a.B::Swap(b); } Index: uppsrc/Core/Other.h =================================================================== --- uppsrc/Core/Other.h (revision 9917) +++ uppsrc/Core/Other.h (working copy) @@ -138,7 +138,7 @@ void Clear(); void Shrink(); - Mitor(Mitor&& m) { Pick(m); } + Mitor(Mitor&& m) { Pick(pick(m)); } void operator=(Mitor&& m) { if(this != &m) { Clear(); Pick(pick(m)); } } Mitor(Mitor& m, int) { Copy(m); }