mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
add nodiscard annotations to fix warnings in msvc
This commit is contained in:
parent
e1b27a0fc2
commit
5b172280b0
4 changed files with 74 additions and 39 deletions
|
@ -189,7 +189,7 @@ mi_heap_t* mi_heap_get_backing(void) {
|
|||
return bheap;
|
||||
}
|
||||
|
||||
mi_heap_t* mi_heap_new(void) {
|
||||
mi_decl_nodiscard mi_heap_t* mi_heap_new(void) {
|
||||
mi_heap_t* bheap = mi_heap_get_backing();
|
||||
mi_heap_t* heap = mi_heap_malloc_tp(bheap, mi_heap_t); // todo: OS allocate in secure mode?
|
||||
if (heap==NULL) return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue