Пример #1
0
int SortListBySeason(const anime::Item& item1, const anime::Item& item2,
                     int order) {
  anime::Season season1(item1.GetDateStart());
  anime::Season season2(item2.GetDateStart());

  if (season1 != season2)
    return CompareValues<anime::Season>(season1, season2);

  if (item1.GetAiringStatus() != item2.GetAiringStatus())
    return SortListByAiringStatus(item1, item2);

  return SortListByTitle(item1, item2) * order;
}
Пример #2
0
int SortListByAiringStatus(const anime::Item& item1, const anime::Item& item2) {
  return CompareValues<int>(item1.GetAiringStatus(), item2.GetAiringStatus());
}