diff options
| author | Aaron Puchert <aaron.puchert@sap.com> | 2017-10-20 12:58:10 +0200 |
|---|---|---|
| committer | Aaron Puchert <aaron.puchert@sap.com> | 2017-11-27 14:57:42 +0100 |
| commit | 3175dce5fcec54fef6299cc8b595d84db5b29cf4 (patch) | |
| tree | 0c82ae4f4afa9eb44893e1bd7d1f9a884459e2d9 /src/proj_internal.h | |
| parent | 1f48f4c333bfe135296d3be643ef4981dc401c38 (diff) | |
| download | PROJ-3175dce5fcec54fef6299cc8b595d84db5b29cf4.tar.gz PROJ-3175dce5fcec54fef6299cc8b595d84db5b29cf4.zip | |
Replace some asserts by compile-time assertions
Decisions regarding the size of certain types are always made at
compile time, hence this is where the assertion should take place.
If the assertions fail, there is now a compiler error.
Diffstat (limited to 'src/proj_internal.h')
| -rw-r--r-- | src/proj_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/proj_internal.h b/src/proj_internal.h index fd6dc75d..4e70e690 100644 --- a/src/proj_internal.h +++ b/src/proj_internal.h @@ -48,6 +48,8 @@ extern "C" { #endif +#define STATIC_ASSERT(COND) ((void)sizeof(char[(COND) ? 1 : -1])) + #ifndef PJ_TODEG #define PJ_TODEG(rad) ((rad)*180.0/M_PI) #endif |
