comparison src/core/anime_season.cc @ 348:6b0768158dcd

text: redesign almost every widget i.e. Paragraph is now a QLabel, etc etc, some things will probably break, idc
author Paper <paper@paper.us.eu.org>
date Tue, 25 Jun 2024 11:19:54 -0400
parents b5d6c27c308f
children
comparison
equal deleted inserted replaced
347:a0aa8c8c4307 348:6b0768158dcd
77 77
78 bool Season::operator>=(const Season& o) const { 78 bool Season::operator>=(const Season& o) const {
79 return !(*this < o); 79 return !(*this < o);
80 } 80 }
81 81
82 Season& Season::operator++() {
83 switch (season) {
84 case Season::Name::Winter: season = Season::Name::Spring; break;
85 case Season::Name::Spring: season = Season::Name::Summer; break;
86 case Season::Name::Summer: season = Season::Name::Autumn; break;
87 case Season::Name::Autumn: season = Season::Name::Winter; year++; break;
88 default: season = Season::Name::Unknown; break;
89 }
90
91 return *this;
82 } 92 }
93
94 Season& Season::operator--() {
95 switch (season) {
96 case Season::Name::Winter: season = Season::Name::Autumn; year--; break;
97 case Season::Name::Spring: season = Season::Name::Winter; break;
98 case Season::Name::Summer: season = Season::Name::Spring; break;
99 case Season::Name::Autumn: season = Season::Name::Summer; break;
100 default: season = Season::Name::Unknown; break;
101 }
102
103 return *this;
104 }
105
106 }