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:
authorChris Blackbourn <chrisbblend@gmail.com>2022-11-13 22:20:53 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-11-13 22:22:36 +0300
commitfba7461e1a51643ea4762f2dc5d4811b49cedbef (patch)
tree6a3006262abdc31662a0c03f00f42bd85f4b8b97
parentd17f5bcd8f26d32b26bc945658e6d308316cd3fe (diff)
UV: fix compile on windows
Remove VLAs for compiling on windows. Regression from 721fc9c1c950
-rw-r--r--source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
index 43975d0d382..897361472a8 100644
--- a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
+++ b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
@@ -309,9 +309,11 @@ static void maximum_common_subgraph_internal(
{
int min = std::min(n0, n1);
- uint8_t cur[min][2];
- uint8_t domains[min * min][BDS];
- uint8_t left[n0], right[n1];
+ uint8_t(*cur)[2] = (uint8_t(*)[2])MEM_mallocN(min * sizeof(*cur), __func__);
+ uint8_t(*domains)[BDS] = (uint8_t(*)[8])MEM_mallocN(min * min * sizeof(*domains), __func__);
+ uint8_t *left = static_cast<uint8_t *>(MEM_mallocN(n0 * sizeof *left, __func__));
+ uint8_t *right = static_cast<uint8_t *>(MEM_mallocN(n1 * sizeof *right, __func__));
+
uint8_t v, w, *bd;
int bd_pos = 0;
for (int i = 0; i < n0; i++) {
@@ -330,7 +332,8 @@ static void maximum_common_subgraph_internal(
* Can occur with moderate sized inputs where the graph has lots of symmetry, e.g. a cube
* subdivided 3x times.
*/
- return;
+ *inc_pos = 0;
+ break;
}
bd = &domains[bd_pos - 1][L];
if (calc_bound(domains, bd_pos, bd[P]) + bd[P] <= *inc_pos ||
@@ -354,6 +357,11 @@ static void maximum_common_subgraph_internal(
}
}
}
+
+ MEM_freeN(cur);
+ MEM_freeN(domains);
+ MEM_freeN(right);
+ MEM_freeN(left);
}
static bool check_automorphism(const GraphISO *g0,