Exemplo n.º 1
0
void Manifest::append(const FileInfoList& fileInfo)
{
    FileInfoList adding(diff(fileInfo));

    for (const auto& f : adding)
    {
        m_fileInfo.emplace_back(f);
        m_remote.push_back(false);
    }
}
Exemplo n.º 2
0
void NodeList::adding(Node* ptr, Node* newNode){
    if(ptr->left == nullptr && ptr->right == nullptr){
        ptr->left = newNode;
    }
    else if (ptr->left != nullptr && ptr->right == nullptr){
        ptr->right = newNode;
    }
    else {
        adding(ptr->left, newNode);
    }
}
Exemplo n.º 3
0
void NodeList::addNode(std::string& name){
    Node* newNode = new Node(name);
    
    //check if this is the first level
    if(head == nullptr){
        head = newNode;
    }
    else {
        adding(head, newNode);
    }
}
Exemplo n.º 4
0
void simple_adding() {
	add_operation op = {3, 5};
	adding(&op);

	printf("Sum is %ld\n", op.result);
}