mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 01:12:39 +01:00
Codefix: Avoiding passing new raw pointer into a smart pointer. (#13138)
Use `std::make_shared` or `std::make_unique` instead of `reset(new ...)`.
This commit is contained in:
@@ -370,7 +370,7 @@ bool GraphicsSet::FillSetDetails(const IniFile &ini, const std::string &path, co
|
||||
GRFConfig &GraphicsSet::GetOrCreateExtraConfig() const
|
||||
{
|
||||
if (!this->extra_cfg) {
|
||||
this->extra_cfg.reset(new GRFConfig(this->files[GFT_EXTRA].filename));
|
||||
this->extra_cfg = std::make_unique<GRFConfig>(this->files[GFT_EXTRA].filename);
|
||||
|
||||
/* We know the palette of the base set, so if the base NewGRF is not
|
||||
* setting one, use the palette of the base set and not the global
|
||||
|
||||
Reference in New Issue
Block a user