mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Replace some raw pointers with unique's or optional
This commit is contained in:
@@ -416,7 +416,8 @@ int main(int argc, char * argv[])
|
||||
if(!settings["session"]["headless"].Bool())
|
||||
{
|
||||
CMessage::dispose();
|
||||
vstd::clear_pointer(graphics);
|
||||
delete graphics;
|
||||
graphics = nullptr;
|
||||
}
|
||||
|
||||
// must be executed before reset - since unique_ptr resets pointer to null before calling destructor
|
||||
@@ -424,7 +425,8 @@ int main(int argc, char * argv[])
|
||||
|
||||
ENGINE.reset();
|
||||
|
||||
vstd::clear_pointer(LIBRARY);
|
||||
delete LIBRARY;
|
||||
LIBRARY = nullptr;
|
||||
logConfigurator.deconfigure();
|
||||
|
||||
std::cout << "Ending...\n";
|
||||
|
||||
Reference in New Issue
Block a user