remove most of SDL_OutOfMemory() calls where SDL is the allocator.
Since commit 447b508a77, SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
This commit is contained in:
1 parent
7abc589438
commit
e909c0360f
15 files changed
+21
-57
No files matched your search
@@ -1335,8 +1335,6 @@ static SDL_AudioDeviceID *GetAudioDevices(int *count, SDL_bool iscapture)
|
||||
|
||||
SDL_assert(devs_seen == num_devices);
|
||||
retval[devs_seen] = 0; // null-terminated.
|
||||
} else {
|
||||
SDL_OutOfMemory();
|
||||
}
|
||||
}
|
||||
SDL_UnlockRWLock(current_audio.device_hash_lock);
|
||||
|
||||
@@ -126,7 +126,7 @@ static int ReserveMemoryPoolBlocks(SDL_MemoryPool *pool, size_t num_blocks)
|
||||
void *block = AllocNewMemoryPoolBlock(pool);
|
||||
|
||||
if (block == NULL) {
|
||||
return SDL_OutOfMemory();
|
||||
return -1;
|
||||
}
|
||||
|
||||
*(void **)block = pool->free_blocks;
|
||||
|
||||
Reference in new issue
Block a user