{"body":"QtmlObjectList::QtmlObjectList( QtmlObjectList &&other ) noexcept\n\t: QList<QtmlObject>( std::move(other) )\n\t, qp(other.qp)\n\t, p_Indent(other.p_Indent)\n\t, q_Indent(other.q_Indent)\n\t, yl(other.yl)\n{\n\tif ( yl.isEmpty() ) { return; }\n\tconst qint32 y( this->y() );\n\tif ( y < 0 || y > qp->m_ObjectList.length() ) {\n\t\tif ( yl.last() != other.y() ) {\n\t\t\tyl << other.y();\n\t\t}\n\t} else if ( yl.last() != y ) {\n\t\tyl << y;\n\t}\n\tthis->updateNodes();\n}\nQtmlObjectList::QtmlObjectList( const QtmlObjectList &other )\n\t: QList<QtmlObject>(other)\n\t, qp(other.qp)\n\t, p_Indent(other.p_Indent)\n\t, q_Indent(other.q_Indent)\n\t, yl(other.yl)\n{\n\tif ( yl.isEmpty() ) { return; }\n\tconst qint32 y( other.y() );\n\tif ( yl.last() != y ) {\n\t\tyl << y;\n\t}\n\tthis->updateNodes();\n}\nQtmlObjectList &QtmlObjectList::operator=( QtmlObjectList &&other ) noexcept\n{\n\tQList<QtmlObject>::operator=( std::move(other) );\n\tqp = other.qp;\n\tp_Indent = other.p_Indent;\n\tq_Indent = other.q_Indent;\n\tyl = other.yl;\n\n\tif ( yl.isEmpty() ) { return *this; }\n\tconst qint32 y( this->y() );\n\tif ( yl.last() != y ) {\n\t\tyl << y;\n\t}\n\tthis->updateNodes();\n\n\treturn *this;\n}\nQtmlObjectList& QtmlObjectList::operator=( const QtmlObjectList& other )\n{\n\tQList<QtmlObject>::operator=(other);\n\tqp = other.qp;\n\tp_Indent = other.p_Indent;\n\tq_Indent = other.q_Indent;\n\tyl = other.yl;\n\n\tif ( yl.isEmpty() ) { return *this; }\n\tconst qint32 y( other.y() );\n\tif ( yl.last() != y ) {\n\t\tyl << y;\n\t}\n\tthis->updateNodes();\n\n\treturn *this;\n}\nvoid QtmlObjectList::updateNodes()\n{\n\tswitch ( yl.length() ) {\n\tcase 0:\n\tcase 1:\n\t\treturn;\n\tcase 2: {\n\t\tint p = yl.first();\n\t\tint q = yl.last();\n\t\tif ( qp->m_YNodeConstructs.contains(p) ) {\n\t\t\tqp->m_RemoveConstructs.append(p);\n\t\t\tqp->m_AddConstructs   .append(q);\n\t\t}\n\t\tif ( qp->m_YNodeDeclarations.contains(p) ) {\n\t\t\tqp->m_RemoveDeclarations.append(p);\n\t\t\tqp->m_AddDeclarations   .append(q);\n\t\t}\n\t\tif ( qp->m_YNodeErrors.contains(p) ) {\n\t\t\tqp->m_RemoveErrors.append(p);\n\t\t\tqp->m_AddErrors   .append(q);\n\t\t}\n\t\treturn;\n\t}\n\tdefault: {\n\t\tint p = yl.first();\n\t\tint o = yl.at( yl.length() - 2 );\n\t\tint q = yl.last();\n\t\tif ( qp->m_YNodeConstructs.contains(p) ) {\n\t\t\tqp->m_AddConstructs.removeOne(o);\n\t\t\tqp->m_AddConstructs.append(q);\n\t\t}\n\t\tif ( qp->m_YNodeDeclarations.contains(p) ) {\n\t\t\tqp->m_AddDeclarations.removeOne(o);\n\t\t\tqp->m_AddDeclarations.append(q);\n\t\t}\n\t\tif ( qp->m_YNodeErrors.contains(p) ) {\n\t\t\tqp->m_AddErrors.removeOne(o);\n\t\t\tqp->m_AddErrors.append(q);\n\t\t}\n\n\t}\n\t}\n}","name":"Move Semantics.cpp","extension":"cpp","url":"https://www.irccloud.com/pastebin/5jk8yjZy/Move+Semantics.cpp","modified":1780488655,"id":"5jk8yjZy","size":2434,"lines":109,"own_paste":false,"theme":"","date":1780488655}