correct use of pointer and fix mistake (#394)

* correct use of pointer and fix mistake

* remove CM_WeirdLength

* Update Game.cpp

* Update Game.cpp

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
coco875
2025-06-28 21:54:06 +00:00
committed by GitHub
parent 35a28cd933
commit 956058a32d
9 changed files with 78 additions and 79 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "Cup.h"
#include "courses/Course.h"
Cup::Cup(std::string id, const char* name, std::vector<Course*> courses) {
Cup::Cup(std::string id, const char* name, std::vector<std::shared_ptr<Course>> courses) {
Id = id;
Name = name;
Courses = courses;
@@ -30,7 +30,7 @@ void Cup::SetCourse(size_t position) {
CursorPosition = position;
}
Course* Cup::GetCourse() {
std::shared_ptr<Course> Cup::GetCourse() {
return Courses[CursorPosition];
}