File indexing completed on 2024-10-27 04:20:49
0001 /* 0002 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "equipmentutil.h" 0008 #include "notesutil_p.h" 0009 0010 #include <KPublicTransport/Equipment> 0011 0012 using namespace KPublicTransport; 0013 0014 Equipment EquipmentUtil::merge(const Equipment &lhs, const Equipment &rhs) 0015 { 0016 auto e = lhs; 0017 e.setDisruptionEffect(std::max(lhs.disruptionEffect(), rhs.disruptionEffect())); 0018 e.setNotes(NotesUtil::mergeNotes(lhs.notes(), rhs.notes())); 0019 e.setType(std::max(lhs.type(), rhs.type())); 0020 return e; 0021 }