Mercurial > minori
comparison src/core/anime.cpp @ 10:4b198a111713
Update
things actually compile now btw
qttest wants to fuck over the model but that might be my fault so /shrug
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sat, 16 Sep 2023 02:06:01 -0400 |
parents | 5c0397762b53 |
children | 2743011a6042 |
comparison
equal
deleted
inserted
replaced
9:5c0397762b53 | 10:4b198a111713 |
---|---|
19 return true; | 19 return true; |
20 return false; | 20 return false; |
21 } | 21 } |
22 | 22 |
23 void Anime::AddToUserList() { | 23 void Anime::AddToUserList() { |
24 if (!list_info_.get()) | |
25 return; | |
26 list_info_.reset(new ListInformation); | 24 list_info_.reset(new ListInformation); |
27 } | 25 } |
28 | 26 |
29 void Anime::RemoveFromUserList() { | 27 void Anime::RemoveFromUserList() { |
30 if (list_info_.get()) | |
31 return; | |
32 list_info_.reset(); | 28 list_info_.reset(); |
33 } | 29 } |
34 | 30 |
35 ListStatus Anime::GetUserStatus() const { | 31 ListStatus Anime::GetUserStatus() const { |
36 assert(list_info_.get()); | 32 assert(list_info_.get()); |
83 } | 79 } |
84 | 80 |
85 void Anime::SetUserStatus(ListStatus status) { | 81 void Anime::SetUserStatus(ListStatus status) { |
86 assert(list_info_.get()); | 82 assert(list_info_.get()); |
87 list_info_->status = status; | 83 list_info_->status = status; |
84 } | |
85 | |
86 void Anime::SetUserScore(int score) { | |
87 assert(list_info_.get()); | |
88 list_info_->score = score; | |
88 } | 89 } |
89 | 90 |
90 void Anime::SetUserProgress(int progress) { | 91 void Anime::SetUserProgress(int progress) { |
91 assert(list_info_.get()); | 92 assert(list_info_.get()); |
92 list_info_->progress = progress; | 93 list_info_->progress = progress; |