示例#1
0
文件: list.cpp 项目: Hydro8182/taiga
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
文件: list.cpp 项目: Hydro8182/taiga
int SortListByAiringStatus(const anime::Item& item1, const anime::Item& item2) {
  return CompareValues<int>(item1.GetAiringStatus(), item2.GetAiringStatus());
}