diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-02-27 22:08:36 -0500 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-02-27 22:08:36 -0500 |
commit | 6cc609204ba7ea1bd0a903cf918a2b7eea979b91 (patch) | |
tree | 7a167b592f4b36d71ef477c2e9597eea65c8a69a /src/survive_config.c | |
parent | b0dc9c89146d2a5904a4ecc6b9c1f8d1c5fcfce0 (diff) | |
download | libsurvive-6cc609204ba7ea1bd0a903cf918a2b7eea979b91.tar.gz libsurvive-6cc609204ba7ea1bd0a903cf918a2b7eea979b91.tar.bz2 |
compile time check of float type
Diffstat (limited to 'src/survive_config.c')
-rw-r--r-- | src/survive_config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/survive_config.c b/src/survive_config.c index 5531006..c46e300 100644 --- a/src/survive_config.c +++ b/src/survive_config.c @@ -168,11 +168,11 @@ const FLT* config_set_float_a(config_group *cg, const char *tag, const FLT* valu } void _json_write_float_array(FILE* f, const char* tag, FLT* v, uint8_t count) { - if (sizeof(FLT) == sizeof(double)) { + #ifdef USE_DOUBLE json_write_double_array(f,tag,v,count); - } else if (sizeof(FLT) == sizeof(float)) { - json_write_double_array(f,tag,v,count); - } + #else + json_write_float_array(f,tag,v,count); + #endif } void write_config_group(FILE* f, config_group *cg, char *tag) { |