Skip to content
Snippets Groups Projects
Commit 3d70d7c0 authored by Andrea Censi's avatar Andrea Censi
Browse files

Workaround for compiler not supporting variable-length array

parent c175e4e3
No related branches found
No related tags found
No related merge requests found
...@@ -200,6 +200,9 @@ void hsm_match(struct hsm_params*p, hsm_buffer b1, hsm_buffer b2) { ...@@ -200,6 +200,9 @@ void hsm_match(struct hsm_params*p, hsm_buffer b1, hsm_buffer b2) {
sm_error("Too few directions.\n"); sm_error("Too few directions.\n");
} }
#define MAX_NPEAKS 1024
assert(p->linear_xc_max_npeaks<MAX_NPEAKS);
struct { struct {
/* Direction of cross correlation */ /* Direction of cross correlation */
double angle; double angle;
...@@ -207,7 +210,8 @@ void hsm_match(struct hsm_params*p, hsm_buffer b1, hsm_buffer b2) { ...@@ -207,7 +210,8 @@ void hsm_match(struct hsm_params*p, hsm_buffer b1, hsm_buffer b2) {
struct { struct {
double delta; double delta;
double value; double value;
} hypotheses[p->linear_xc_max_npeaks]; // } hypotheses[p->linear_xc_max_npeaks];
} hypotheses[MAX_NPEAKS];
} dirs[ndirections]; } dirs[ndirections];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment