Fix minor code style issues

This commit is contained in:
Hugues Delorme 2014-01-29 11:34:10 +01:00
parent 55a6837c76
commit a2f39de890
2 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,7 @@
#define FOUG_LIBSTL_STL_ERROR_H
#define FOUG_STL_ERROR_TAG 0x11000000
/* Specific error codes returned by foug_stla_read() */
#define FOUG_STLA_READ_PARSE_ERROR (FOUG_STL_ERROR_TAG + 1)
@ -10,7 +11,7 @@
#define FOUG_STLA_WRITE_INVALID_REAL32_PRECISION (FOUG_STL_ERROR_TAG + 101)
/* Specific error code common to foug_stlb_read() and foug_stlb_write() */
#define FOUG_STLB_READWRITE_UNSUPPORTED_BYTE_ORDER (FOUG_STL_ERROR_TAG + 200)
#define FOUG_STLB_READWRITE_UNSUPPORTED_BYTE_ORDER (FOUG_STL_ERROR_TAG + 200)
/* Specific error codes returned by foug_stlb_read() */
#define FOUG_STLB_READ_HEADER_WRONG_SIZE_ERROR (FOUG_STL_ERROR_TAG + 300)

View File

@ -37,14 +37,13 @@ static void foug_stlb_write_facets(const foug_stlb_geom_output_t* geom,
const uint32_t facet_count = wparams->facet_count;
const uint32_t i_facet_offset = wparams->i_facet_offset;
foug_stlb_triangle_t triangle;
uint32_t buffer_offset;
uint32_t i_facet;
uint32_t buffer_offset = 0;
uint32_t i_facet = 0;
if (geom == NULL || geom->get_triangle_func == NULL)
return;
triangle.attribute_byte_count = 0;
buffer_offset = 0;
for (i_facet = i_facet_offset; i_facet < (i_facet_offset + facet_count); ++i_facet) {
geom->get_triangle_func(geom->cookie, i_facet, &triangle.data);
if (geom->get_attr_byte_count_func != NULL)