bool KateUndoGroup::merge(KateUndoGroup *newGroup, bool complex) { if(m_safePoint) return false; if(newGroup->isOnlyType(singleType()) || complex) { // Take all of its items first -> last KateUndo *u = newGroup->m_items.take(0); while(u) { addItem(u); u = newGroup->m_items.take(0); } if(newGroup->m_safePoint) safePoint(); return true; } return false; }
bool KateUndoGroup::merge (KateUndoGroup* newGroup,bool complex) { if (m_safePoint) return false; if (newGroup->isOnlyType(singleType()) || complex) { // Take all of its items first -> last KateUndo* u = newGroup->m_items.isEmpty() ? 0 : newGroup->m_items.takeFirst (); while (u) { addItem(u); u = newGroup->m_items.isEmpty() ? 0 : newGroup->m_items.takeFirst (); } if (newGroup->m_safePoint) safePoint(); m_redoCursor = newGroup->m_redoCursor; m_redoSelection = newGroup->m_redoSelection; return true; } return false; }
bool OccupancyMap::safePoint(double x, double y) const { return safePoint(x, y, lethalOccDist()); }