diff options
author | John Hawthorn <john@freerunningtechnologies.com> | 2014-09-17 10:43:01 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-09-17 19:11:14 -0700 |
commit | 39248de046c1debca11aadadde1bc5cd23d487d0 (patch) | |
tree | 6d302f8569443a0e2f5fc2fc3814a4f7c8119c8e /choices.h | |
parent | 989644d5ff9039ba23aedca109068944346c8936 (diff) |
Use AoS instead of SoA; don't use qsort_r
Fixes Bus Error on BSDs due to qsort_r not being the same qsort_r as
linux.
Diffstat (limited to 'choices.h')
-rw-r--r-- | choices.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,14 +1,18 @@ #ifndef CHOICES_H #define CHOICES_H CHOICES_H +struct scored_position { + size_t position; + double score; +}; + typedef struct { size_t capacity; size_t size; const char **strings; - double *scores; + struct scored_position *results; - size_t *sorted; size_t available; size_t selection; } choices_t; |