changed all non-owned unique_ptr access to reference to the object itself
This commit is contained in:
@ -121,18 +121,19 @@ feature proc_args(int argc, char **argv,
|
||||
|
||||
if (result & FEATURE_NCURSES) {
|
||||
curse = std::make_unique<cursor>();
|
||||
in = std::make_unique<curses_input>(curse);
|
||||
out = std::make_unique<curses_output>(curse);
|
||||
in = std::make_unique<curses_input>(*curse);
|
||||
out = std::make_unique<curses_output>(*curse);
|
||||
}
|
||||
|
||||
if (result & FEATURE_SEED) {
|
||||
std::istringstream iss {seed};
|
||||
unsigned int tmp;
|
||||
iss >> tmp;
|
||||
if (!iss.good())
|
||||
|
||||
if (!iss.good())
|
||||
return FEATURE_PANIC_SEED;
|
||||
|
||||
rng = std::make_unique<RNG>(tmp);
|
||||
rng = std::make_unique<RNG>(tmp);
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -166,9 +167,8 @@ void panic_args(feature panic) {
|
||||
cerr << "Something must have went really, really, wrong..."
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
else if (panic & FEATURE_PANIC_SEED) {
|
||||
cerr << "Invalid seed" << endl;
|
||||
} else if (panic & FEATURE_PANIC_SEED) {
|
||||
cerr << "Invalid seed" << endl;
|
||||
} else
|
||||
cerr << "Something must have went really, really, wrong..."
|
||||
<< endl;
|
||||
|
Reference in New Issue
Block a user