23 while (
y &&
n ==
y->right) {
41 while (
y &&
n ==
y->left) {
57 n->left->setParent(
n);
63 n->right->setParent(
n);
82 if (
y->left !=
nullptr)
84 y->setParent(
x->parent());
87 else if (
x ==
x->parent()->left)
88 x->parent()->left =
y;
90 x->parent()->right =
y;
93 y->size_left +=
x->size_left;
109 if (
y->right !=
nullptr)
111 y->setParent(
x->parent());
114 else if (
x ==
x->parent()->right)
115 x->parent()->right =
y;
117 x->parent()->left =
y;
120 x->size_left -=
y->size_left;
129 if (
x->parent() ==
x->parent()->parent()->left) {
135 x =
x->parent()->parent();
137 if (
x ==
x->parent()->right) {
143 rotateRight (
x->parent()->parent());
151 x =
x->parent()->parent();
153 if (
x ==
x->parent()->left) {
159 rotateLeft(
x->parent()->parent());
172 if (
y->left ==
nullptr) {
174 if (
y == mostLeftNode) {
180 }
else if (
y->right ==
nullptr) {
184 while (
y->left !=
nullptr)
208 x->setParent(x_parent);
215 else if (
y->parent()->left ==
y)
216 y->parent()->left =
x;
218 y->parent()->right =
x;
219 if (
x &&
x ==
y->right)
220 x->size_left +=
y->size_left;
225 if (
x == x_parent->
left) {
230 rotateLeft(x_parent);
237 x_parent = x_parent->
parent();
250 rotateLeft(x_parent);
258 rotateRight(x_parent);
265 x_parent = x_parent->
parent();
278 rotateRight(x_parent);
290void SparseArray::recalcMostLeftNode()
292 mostLeftNode = &header;
293 while (mostLeftNode->
left)
294 mostLeftNode = mostLeftNode->
left;
302 return 2 *
sizeof(
void*);
326 node->
left =
nullptr;
327 node->
right =
nullptr;
329 node->
value = UINT_MAX;
335 if (
parent == mostLeftNode)
360 header.
left =
nullptr;
361 header.
right =
nullptr;
362 mostLeftNode = &header;
368 header.
right =
nullptr;
369 if (
other.header.left) {
370 header.
left =
other.header.left->copy(
this);
372 recalcMostLeftNode();
385 if (
s ==
n->size_left) {
387 }
else if (s < n->size_left) {
\qmltype Particle \inqmlmodule QtQuick.Particles
void qFreeAligned(void *ptr)
QT_BEGIN_NAMESPACE void * qMallocAligned(size_t size, size_t alignment)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
static void qMapDeallocate(SparseArrayNode *node, int alignment)
static int qMapAlignmentThreshold()
static void * qMapAllocate(int alloc, int alignment)
Q_CHECK_PTR(a=new int[80])
SparseArrayNode * copy(SparseArray *d) const
const SparseArrayNode * previousNode() const
SparseArrayNode * parent() const
const SparseArrayNode * nextNode() const
void setParent(SparseArrayNode *pp)
SparseArrayNode * createNode(uint sl, SparseArrayNode *parent, bool left)
SparseArrayNode * insert(uint akey)
void freeTree(SparseArrayNode *root, int alignment)
const SparseArrayNode * end() const
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent