Merge pull request #111018 from Zylann/fix_double_build_get_downloads_availability

Fix unreachable code warning in double-precision builds
This commit is contained in:
Thaddeus Crews 2025-09-30 20:10:38 -05:00
commit 22467f3a5b
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -59,8 +59,6 @@ enum DownloadsAvailability {
};
static DownloadsAvailability _get_downloads_availability() {
const int network_mode = EDITOR_GET("network/connection/network_mode");
// Downloadable export templates are only available for stable and official alpha/beta/RC builds
// (which always have a number following their status, e.g. "alpha1").
// Therefore, don't display download-related features when using a development version
@ -74,13 +72,16 @@ static DownloadsAvailability _get_downloads_availability() {
#ifdef REAL_T_IS_DOUBLE
return DOWNLOADS_NOT_AVAILABLE_FOR_DOUBLE_BUILDS;
#endif
#else
const int network_mode = EDITOR_GET("network/connection/network_mode");
if (network_mode == EditorSettings::NETWORK_OFFLINE) {
return DOWNLOADS_NOT_AVAILABLE_IN_OFFLINE_MODE;
}
return DOWNLOADS_AVAILABLE;
#endif
}
void ExportTemplateManager::_update_template_status() {