Don't assume there are only two formats
Opened this issue · 0 comments
spbnick commented
Make sure the conv code never assumes that there are only two formats possible and doesn't do something like:
if (format == AUSHAPE_FORMAT_XML) {
/* Format is XML */
} else {
/* *Assume* format is JSON */
}
Instead do this:
if (format == AUSHAPE_FORMAT_XML) {
/* Format is XML */
} else if (format == AUSHAPE_FORMAT_JSON) {
/* Format *is* JSON */
}
This way in case another format is added, there won't be a possibility of
output in mixed format.