Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-08-26 20:42:40 +0300
committerRay Molenkamp <github@lazydodo.com>2020-08-26 20:42:40 +0300
commitf807b27b677d18d32ab08d1f4f27c6829c2d8bd8 (patch)
treef3ed81bdd2a4fb9a5d40e267ca1e2f07320916a2 /source/blender/blenlib/BLI_array.h
parent0498feb0dfc221fb7fb060728e2fd0be6d8085b4 (diff)
Cleanup: Fix const warning with BLI_array_free
when you call the BLI_array_free macro with a const pointer you get a warning when the macro calls `MEM_freeN` (warning C4090: 'function': different 'const' qualifiers) This was warning originating from `smart_uv_project_calculate_project_normals` in `uvedit_unwrap_ops.c` Normally we resolve these with a non const cast at the callsite but given BLI_array_free is a macro not a function this is not an option here and it has to be resolved in the macro.
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r--source/blender/blenlib/BLI_array.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 6ea01d45f79..88cbbbc5fa6 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -117,7 +117,7 @@ void _bli_array_grow_func(void **arr_p,
{ \
if (arr && (char *)arr != _##arr##_static) { \
BLI_array_fake_user(arr); \
- MEM_freeN(arr); \
+ MEM_freeN((void*)arr); \
} \
} \
((void)0)