changed all non-owned unique_ptr access to reference to the object itself

This commit is contained in:
2024-07-11 22:15:15 -04:00
parent 6d3e8229df
commit c68330b3e3
17 changed files with 73 additions and 57 deletions

View File

@ -1,10 +1,10 @@
#include "curses_input.h"
curses_input::curses_input(const std::unique_ptr<cursor> &new_curse):
curses_input::curses_input(cursor &new_curse):
curse{new_curse} {}
game_command curses_input::get_command() {
switch (curse->getcmd()) {
switch (curse.getcmd()) {
case 'h':
return game_command::move_west;
@ -51,7 +51,7 @@ game_command curses_input::get_command() {
return game_command_pass;
}
switch (curse->getcmd()) {
switch (curse.getcmd()) {
case 'h':
return game_command::apply_west;