diff options
author | Robin Gareus <robin@gareus.org> | 2019-12-30 19:05:10 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-12-30 19:05:51 +0100 |
commit | def4be728506c8edf710c48cd0891a902dc0a6b9 (patch) | |
tree | 3b992a3444fd05bccba1301ba80428f54e138c8e /libs/pbd/pbd/natsort.h | |
parent | b8460441fb31d89c2264879a7612f63e3ee8c1bf (diff) |
Fix MSVC builds, use C89 strtol() instead of C99 strtoll()
For the case at hand (plugin scale-points) it's highly unlikely to
encounter numbers > INT_MAX.
Diffstat (limited to 'libs/pbd/pbd/natsort.h')
-rw-r--r-- | libs/pbd/pbd/natsort.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/pbd/pbd/natsort.h b/libs/pbd/pbd/natsort.h index e96d682147..b16ffd6968 100644 --- a/libs/pbd/pbd/natsort.h +++ b/libs/pbd/pbd/natsort.h @@ -21,6 +21,7 @@ #include <ctype.h> #include <stdlib.h> +#include <stdint.h> namespace PBD { @@ -83,8 +84,8 @@ numerically_less (const char* a, const char* b) continue; } if (d_a) { - const int64_t ia = strtoll (d_a, NULL, 0) * order_of_magnitude (d_a); - const int64_t ib = strtoll (d_b, NULL, 0) * order_of_magnitude (d_b); + const int64_t ia = strtol (d_a, NULL, 0) * order_of_magnitude (d_a); + const int64_t ib = strtol (d_b, NULL, 0) * order_of_magnitude (d_b); if (ia != ib) { return ia < ib; } |