From 0c06e34abe554004e46cb2413170db01a5f74676 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 3 May 2016 09:01:49 +0000 Subject: [PATCH] New Core fixes git-svn-id: svn://ultimatepp.org/upp/trunk@9778 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/InVector.h | 8 +++++--- uppsrc/Core/InVector.hpp | 16 ++++++++++++++++ uppsrc/Core/todo.txt | 12 +++--------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/uppsrc/Core/InVector.h b/uppsrc/Core/InVector.h index 22d169328..3c3ab1912 100644 --- a/uppsrc/Core/InVector.h +++ b/uppsrc/Core/InVector.h @@ -39,6 +39,8 @@ private: uint16 blk_low; uint16 slave; + void Pick(InVector&& b); + InVectorSlave__ *Slave() { return (InVectorSlave__ *)((byte *)this + slave); } void SetSlave(InVectorSlave__ *s) { slave = (uint16)((byte *)s - (byte *)this); } @@ -48,7 +50,7 @@ private: int FindBlock(int& pos, int& off) const; int FindBlock(int& pos) const; void SetBlkPar(); - + template int FindUpperBound(const T& val, const L& less, int& off, int& pos) const; @@ -139,9 +141,9 @@ public: Iterator end() { Iterator it; SetEnd(it); return it; } InVector(); - + InVector(InVector&& v) { Pick(pick(v)); } + void operator=(InVector&& v) { Pick(pick(v)); } InVector(const InVector& v, int); - InVector(std::initializer_list init) { Init(); for(const auto& i : init) Add(i); } void Swap(InVector& b); diff --git a/uppsrc/Core/InVector.hpp b/uppsrc/Core/InVector.hpp index 61f8e1989..2df3c2e6b 100644 --- a/uppsrc/Core/InVector.hpp +++ b/uppsrc/Core/InVector.hpp @@ -466,6 +466,22 @@ InVector::InVector(const InVector& v, int) slave = v.slave; } +template +void InVector::Pick(InVector&& v) +{ + data = pick(v.data); + index = pick(v.index); + count = v.count; + hcount = v.hcount; + blk_high = v.blk_high; + blk_low = v.blk_low; + serial = v.serial; + slave = v.slave; + + v.Init(); +} + + template template int InVector::FindUpperBound(const T& val, const L& less, int& off, int& pos) const diff --git a/uppsrc/Core/todo.txt b/uppsrc/Core/todo.txt index 8f806c6bd..8b51bf6e4 100644 --- a/uppsrc/Core/todo.txt +++ b/uppsrc/Core/todo.txt @@ -1,15 +1,6 @@ -CLANG11 autotest/ValueRef : FAILED -CLANG11 autotest/RangeInsertTest : TIMEOUT -CLANG11 autotest/LambdaCallback : FAILED CLANG11 autotest/Qtf : FAILED CLANG11 autotest/StringBuffer2GB : ERROR CLANG11 autotest/CheckDownloads : FAILED -CLANG11 autotest/Core11 : FAILED -CLANG11 autotest/CompareContainer : FAILED -CLANG11 reference/SocketServer : ERROR -CLANG11 reference/Cv : ERROR -CLANG11 reference/CallbackPickClone : ERROR -CLANG11 reference/BasicAlgo : ERROR CLANG11 reference/Log : ERROR CLANG11 reference/Tuple : ERROR CLANG11 reference/SocketClient : ERROR @@ -20,7 +11,10 @@ CLANG11 upptst/idetest : ERROR CLANG11 upptst/Zip : ERROR CLANG11 tutorial/Ntl10 : ERROR +uppbox + +CLANG11 reference/CallbackPickClone : ERROR CLANG11 autotest/CallbackPick : ERROR oportunity &&