mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 12:14:11 +01:00
Codefix: Move provider instances to static members. (#14501)
Avoids misnaming in global scope.
This commit is contained in:
@@ -145,6 +145,9 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static ScreenshotProvider_Bmp instance;
|
||||
};
|
||||
|
||||
static ScreenshotProvider_Bmp s_screenshot_provider_bmp;
|
||||
/* static */ ScreenshotProvider_Bmp ScreenshotProvider_Bmp::instance{};
|
||||
|
||||
@@ -149,6 +149,9 @@ public:
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
private:
|
||||
static ScreenshotProvider_Pcx instance;
|
||||
};
|
||||
|
||||
static const ScreenshotProvider_Pcx s_screenshot_provider_pcx;
|
||||
/* static */ ScreenshotProvider_Pcx ScreenshotProvider_Pcx::instance{};
|
||||
|
||||
@@ -177,6 +177,9 @@ private:
|
||||
{
|
||||
Debug(misc, 1, "[libpng] warning: {} - {}", message, *static_cast<std::string_view *>(png_get_error_ptr(png_ptr)));
|
||||
}
|
||||
|
||||
private:
|
||||
static ScreenshotProvider_Png instance;
|
||||
};
|
||||
|
||||
static ScreenshotProvider_Png s_screenshot_provider_png;
|
||||
/* static */ ScreenshotProvider_Png ScreenshotProvider_Png::instance{};
|
||||
|
||||
@@ -83,6 +83,9 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static SoundLoader_Opus instance;
|
||||
};
|
||||
|
||||
static SoundLoader_Opus s_sound_loader_opus;
|
||||
/* static */ SoundLoader_Opus SoundLoader_Opus::instance{};
|
||||
|
||||
@@ -47,6 +47,9 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static SoundLoader_Raw instance;
|
||||
};
|
||||
|
||||
static SoundLoader_Raw s_sound_loader_raw;
|
||||
/* static */ SoundLoader_Raw SoundLoader_Raw::instance{};
|
||||
|
||||
@@ -96,6 +96,9 @@ public:
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
static SoundLoader_Wav instance;
|
||||
};
|
||||
|
||||
static SoundLoader_Wav s_sound_loader_wav;
|
||||
/* static */ SoundLoader_Wav SoundLoader_Wav::instance{};
|
||||
|
||||
Reference in New Issue
Block a user