gmio_stl: use anonymous enum instead of #define for constants
This commit is contained in:
parent
15518d5a0d
commit
0a98161182
@ -2,7 +2,7 @@
|
||||
#define GMIO_LIBSTL_STL_ERROR_H
|
||||
|
||||
/*! A byte-mask to tag(identify) STL-specific error codes */
|
||||
#define GMIO_STL_ERROR_TAG 0x11000000
|
||||
enum { GMIO_STL_ERROR_TAG = 0x11000000 };
|
||||
|
||||
/*! This enum defines the various error codes reported by STL read/write functions */
|
||||
enum gmio_stl_error
|
||||
|
@ -14,7 +14,7 @@
|
||||
#endif /* GMIO_LIBSTL_DLL */
|
||||
|
||||
/* STLB */
|
||||
#define GMIO_STLB_HEADER_SIZE 80
|
||||
#define GMIO_STLB_MIN_CONTENTS_SIZE 284
|
||||
enum { GMIO_STLB_HEADER_SIZE = 80 };
|
||||
enum { GMIO_STLB_MIN_CONTENTS_SIZE = 284 };
|
||||
|
||||
#endif /* GMIO_LIBSTL_GLOBAL_H */
|
||||
|
@ -30,12 +30,12 @@ struct gmio_stl_triangle
|
||||
typedef struct gmio_stl_triangle gmio_stl_triangle_t;
|
||||
|
||||
/*! Compact size of a gmio_stl_coords_t object */
|
||||
#define GMIO_STL_COORDS_RAWSIZE (3 * sizeof(gmio_real32_t))
|
||||
enum { GMIO_STL_COORDS_RAWSIZE = (3 * sizeof(gmio_real32_t)) };
|
||||
|
||||
/*! Compact size of a gmio_stl_triangle_t object for STL ascii format */
|
||||
#define GMIO_STLA_TRIANGLE_RAWSIZE (4 * GMIO_STL_COORDS_RAWSIZE)
|
||||
enum { GMIO_STLA_TRIANGLE_RAWSIZE = (4 * GMIO_STL_COORDS_RAWSIZE) };
|
||||
|
||||
/*! Compact size of a gmio_stl_triangle_t object for STL binary format */
|
||||
#define GMIO_STLB_TRIANGLE_RAWSIZE (GMIO_STLA_TRIANGLE_RAWSIZE + sizeof(uint16_t))
|
||||
enum { GMIO_STLB_TRIANGLE_RAWSIZE = (GMIO_STLA_TRIANGLE_RAWSIZE + sizeof(uint16_t)) };
|
||||
|
||||
#endif /* GMIO_LIBSTL_TRIANGLE_H */
|
||||
|
@ -383,7 +383,7 @@ static void parse_solid(gmio_stla_parse_data_t* data)
|
||||
}
|
||||
}
|
||||
|
||||
#define GMIO_STLA_READ_STRING_BUFFER_LEN 512
|
||||
enum { GMIO_STLA_READ_STRING_BUFFER_LEN = 512 };
|
||||
|
||||
int gmio_stla_read(gmio_stl_mesh_creator_t* creator,
|
||||
gmio_transfer_t* trsf,
|
||||
|
@ -26,9 +26,9 @@
|
||||
* Total with EOL(2 chars) = 307 + 7*2 = 321
|
||||
*/
|
||||
|
||||
#define GMIO_STLA_FACET_SIZE 321
|
||||
#define GMIO_STLA_FACET_SIZE_P2 512
|
||||
#define GMIO_STLA_SOLID_NAME_MAX_LEN 512
|
||||
enum { GMIO_STLA_FACET_SIZE = 321 };
|
||||
enum { GMIO_STLA_FACET_SIZE_P2 = 512 };
|
||||
enum { GMIO_STLA_SOLID_NAME_MAX_LEN = 512 };
|
||||
|
||||
static char* gmio_write_string(char* buffer, const char* str)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user