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); } }
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); } }
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); } }
void simple_adding() { add_operation op = {3, 5}; adding(&op); printf("Sum is %ld\n", op.result); }