Renaming some ERROR flags to INVALID
This commit is contained in:
1 parent
efcf831cb5
commit
0c8e12ce30
6 files changed
+12
-5
No files matched your search
+1
-1
@@ -959,7 +959,7 @@ struct cmc_callbacks_bidimap
|
|||||||
/* Not possible to shrink with current available prime numbers */ \
|
/* Not possible to shrink with current available prime numbers */ \
|
||||||
if (new_cap < _map_->count / _map_->load) \
|
if (new_cap < _map_->count / _map_->load) \
|
||||||
{ \
|
{ \
|
||||||
_map_->flag = cmc_flags.ERROR; \
|
_map_->flag = cmc_flags.INVALID; \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
+1
-1
@@ -832,7 +832,7 @@ struct cmc_callbacks_hashmap
|
|||||||
/* Not possible to shrink with current available prime numbers */ \
|
/* Not possible to shrink with current available prime numbers */ \
|
||||||
if (theoretical_size < _map_->count / _map_->load) \
|
if (theoretical_size < _map_->count / _map_->load) \
|
||||||
{ \
|
{ \
|
||||||
_map_->flag = cmc_flags.ERROR; \
|
_map_->flag = cmc_flags.INVALID; \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
+1
-1
@@ -713,7 +713,7 @@ struct cmc_callbacks_hashset
|
|||||||
/* Not possible to shrink with current available prime numbers */ \
|
/* Not possible to shrink with current available prime numbers */ \
|
||||||
if (theoretical_size < _set_->count / _set_->load) \
|
if (theoretical_size < _set_->count / _set_->load) \
|
||||||
{ \
|
{ \
|
||||||
_set_->flag = cmc_flags.ERROR; \
|
_set_->flag = cmc_flags.INVALID; \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
+1
-1
@@ -523,7 +523,7 @@ struct cmc_callbacks_heap
|
|||||||
\
|
\
|
||||||
if (capacity < _heap_->count) \
|
if (capacity < _heap_->count) \
|
||||||
{ \
|
{ \
|
||||||
_heap_->flag = cmc_flags.ERROR; \
|
_heap_->flag = cmc_flags.INVALID; \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
@@ -706,6 +706,13 @@ struct cmc_callbacks_intervalheap
|
|||||||
return true; \
|
return true; \
|
||||||
\
|
\
|
||||||
if (capacity < _heap_->count) \
|
if (capacity < _heap_->count) \
|
||||||
|
{ \
|
||||||
|
_heap_->flag = cmc_flags.INVALID; \
|
||||||
|
return false; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
/* Prevent overflow */ \
|
||||||
|
if (capacity == UINTMAX_MAX) \
|
||||||
{ \
|
{ \
|
||||||
_heap_->flag = cmc_flags.ERROR; \
|
_heap_->flag = cmc_flags.ERROR; \
|
||||||
return false; \
|
return false; \
|
||||||
|
|||||||
+1
-1
@@ -1078,7 +1078,7 @@ struct cmc_callbacks_multimap
|
|||||||
/* Not possible to shrink with current available prime numbers */ \
|
/* Not possible to shrink with current available prime numbers */ \
|
||||||
if (theoretical_size < _map_->count / _map_->load) \
|
if (theoretical_size < _map_->count / _map_->load) \
|
||||||
{ \
|
{ \
|
||||||
_map_->flag = cmc_flags.ERROR; \
|
_map_->flag = cmc_flags.INVALID; \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|||||||
Reference in new issue
Block a user