propogate player smart-pointer usage

This commit is contained in:
DanielProl1xy
2024-02-21 15:27:00 +03:00
parent 7c6b52cb2a
commit 0b31a19f47
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -559,11 +559,11 @@ bool WorldFiles::readWorldInfo(World* world) {
return true;
}
void WorldFiles::writePlayer(Player* player) {
void WorldFiles::writePlayer(std::shared_ptr<Player> player) {
files::write_json(getPlayerFile(), player->serialize().release());
}
bool WorldFiles::readPlayer(Player* player) {
bool WorldFiles::readPlayer(std::shared_ptr<Player> player) {
fs::path file = getPlayerFile();
if (!fs::is_regular_file(file)) {
std::cerr << "warning: player.json does not exists" << std::endl;