CListModelBase and CViewBase: reduce the number of template parameters

by relying on what can easily be deduced from the first parameter(s).
This commit is contained in:
Mat Sutcliffe
2018-12-20 01:03:22 +00:00
parent 5295473c4f
commit 1b4ed84e1b
81 changed files with 585 additions and 489 deletions

View File

@@ -22,22 +22,22 @@ namespace BlackGui
{
namespace Views
{
template<class ModelClass, class ContainerType, class ObjectType>
void CViewWithTimestampWithOffsetObjects<ModelClass, ContainerType, ObjectType>::push_frontKeepLatestAdjustedFirst(const ObjectType &object, int max)
template<class T>
void CViewWithTimestampWithOffsetObjects<T>::push_frontKeepLatestAdjustedFirst(const ObjectType &object, int max)
{
this->derivedModel()->push_frontKeepLatestAdjustedFirst(object, max);
}
template <class ModelClass, class ContainerType, class ObjectType>
CViewWithTimestampWithOffsetObjects<ModelClass, ContainerType, ObjectType>::CViewWithTimestampWithOffsetObjects(QWidget *parent) :
CViewBase<ModelClass, ContainerType, ObjectType>(parent)
template <class T>
CViewWithTimestampWithOffsetObjects<T>::CViewWithTimestampWithOffsetObjects(QWidget *parent) :
CViewBase<ModelClass>(parent)
{
// void
}
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftPartsListModel, BlackMisc::Aviation::CAircraftPartsList, BlackMisc::Aviation::CAircraftParts>;
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftSituationListModel, BlackMisc::Aviation::CAircraftSituationList, BlackMisc::Aviation::CAircraftSituation>;
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftSituationChangeListModel, BlackMisc::Aviation::CAircraftSituationChangeList, BlackMisc::Aviation::CAircraftSituationChange>;
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftPartsListModel>;
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftSituationListModel>;
template class CViewWithTimestampWithOffsetObjects<BlackGui::Models::CAircraftSituationChangeListModel>;
} // namespace
} // namespace