Cleanup: resolve build errors without TBB on Linux

Unfortunately C style casts are needed as the underlying types depend
on the build configuration.
This commit is contained in:
Campbell Barton
2025-03-20 22:13:33 +00:00
parent 2659ec12f5
commit 8a06a0da84
2 changed files with 4 additions and 4 deletions

View File

@@ -56,7 +56,7 @@ void BKE_main_init(Main &bmain)
{
SpinLock *main_lock = MEM_mallocN<SpinLock>("main lock");
BLI_spin_init(main_lock);
bmain.lock = reinterpret_cast<MainLock *>(main_lock);
bmain.lock = (MainLock *)main_lock;
bmain.is_global_main = false;
/* Just rebuilding the Action Slot to ID* map once is likely cheaper than,

View File

@@ -75,7 +75,7 @@ static void sound_copy_data(Main * /*bmain*/,
sound_dst->cache = nullptr;
sound_dst->waveform = nullptr;
sound_dst->playback_handle = nullptr;
sound_dst->spinlock = MEM_mallocN<SpinLock>("sound_spinlock");
sound_dst->spinlock = (void *)MEM_mallocN<SpinLock>("sound_spinlock");
BLI_spin_init(static_cast<SpinLock *>(sound_dst->spinlock));
/* Just to be sure, should not have any value actually after reading time. */
@@ -184,7 +184,7 @@ static void sound_blend_read_data(BlendDataReader *reader, ID *id)
sound->tags |= SOUND_TAGS_WAVEFORM_NO_RELOAD;
}
sound->spinlock = MEM_mallocN<SpinLock>("sound_spinlock");
sound->spinlock = (void *)MEM_mallocN<SpinLock>("sound_spinlock");
BLI_spin_init(static_cast<SpinLock *>(sound->spinlock));
/* clear waveform loading flag */
@@ -274,7 +274,7 @@ bSound *BKE_sound_new_file(Main *bmain, const char *filepath)
sound->audio_channels = info.specs.channels;
}
sound->spinlock = MEM_mallocN<SpinLock>("sound_spinlock");
sound->spinlock = (void *)MEM_mallocN<SpinLock>("sound_spinlock");
BLI_spin_init(static_cast<SpinLock *>(sound->spinlock));
BKE_sound_reset_runtime(sound);