diff 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
line wrap: on
line diff
--- a/src/core/anime_season.cc	Sun Jun 23 10:32:09 2024 -0400
+++ b/src/core/anime_season.cc	Tue Jun 25 11:19:54 2024 -0400
@@ -79,4 +79,28 @@
 	return !(*this < o);
 }
 
+Season& Season::operator++() {
+	switch (season) {
+		case Season::Name::Winter: season = Season::Name::Spring; break;
+		case Season::Name::Spring: season = Season::Name::Summer; break;
+		case Season::Name::Summer: season = Season::Name::Autumn; break;
+		case Season::Name::Autumn: season = Season::Name::Winter; year++; break;
+		default: season = Season::Name::Unknown; break;
+	}
+
+	return *this;
 }
+
+Season& Season::operator--() {
+	switch (season) {
+		case Season::Name::Winter: season = Season::Name::Autumn; year--; break;
+		case Season::Name::Spring: season = Season::Name::Winter; break;
+		case Season::Name::Summer: season = Season::Name::Spring; break;
+		case Season::Name::Autumn: season = Season::Name::Summer; break;
+		default: season = Season::Name::Unknown; break;
+	}
+
+	return *this;
+}
+
+}