commit 62549234a3ee6b556f7655a52c9e0ae80d1c86e5
parent 36a4d2dca50330939003c27b3b9fa6c3a54e26dc
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 13 Dec 2019 11:15:59 +0100
Fix an unwanted type rename
Diffstat:
4 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/src/sg3_geometry.c b/src/sg3_geometry.c
@@ -27,9 +27,9 @@
static void
geometry_release(ref_T* ref)
{
- struct sg3* geom;
+ struct sg3_geometry* geom;
ASSERT(ref);
- geom = CONTAINER_OF(ref, struct sg3, ref);
+ geom = CONTAINER_OF(ref, struct sg3_geometry, ref);
darray_triangle_release(&geom->unique_triangles);
darray_vertex_release(&geom->unique_vertices);
@@ -97,7 +97,7 @@ trg_make_key(struct unsigned3* k, const unsigned t[3])
static void
dump_trg_property
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
FILE* stream,
const enum sg3_property_type type)
{
@@ -133,7 +133,7 @@ dump_trg_property
******************************************************************************/
res_T
geometry_register_triangle
- (struct sg3* geom,
+ (struct sg3_geometry* geom,
const struct triangle* triangle,
const unsigned triangle_unique_id,
const unsigned set_id,
@@ -220,7 +220,7 @@ error:
static void
dump_partition
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
FILE* stream,
const char* group_name,
enum sg3_dump_content partition)
@@ -263,9 +263,9 @@ dump_partition
res_T
sg3_geometry_create
(struct sg3_device* dev,
- struct sg3** out_geometry)
+ struct sg3_geometry** out_geometry)
{
- struct sg3* geom = NULL;
+ struct sg3_geometry* geom = NULL;
res_T res = RES_OK;
if(!dev || !out_geometry) {
@@ -273,7 +273,7 @@ sg3_geometry_create
goto error;
}
- geom = MEM_CALLOC(dev->allocator, 1, sizeof(struct sg3));
+ geom = MEM_CALLOC(dev->allocator, 1, sizeof(struct sg3_geometry));
if(!geom) {
log_err(dev,
"%s: could not allocate the sg3.\n", FUNC_NAME);
@@ -310,7 +310,7 @@ error:
res_T
sg3_geometry_add
- (struct sg3* geom,
+ (struct sg3_geometry* geom,
const unsigned ntris,
void(*indices)(const unsigned, unsigned*, void*),
void(*properties)(const unsigned, unsigned*, void*), /* Can be NULL */
@@ -491,7 +491,7 @@ error:
res_T
sg3_geometry_validate_properties
- (struct sg3* geom,
+ (struct sg3_geometry* geom,
res_T(*validate)(const unsigned, const unsigned*, void*, int*),
void* ctx)
{
@@ -535,7 +535,7 @@ error:
res_T
sg3_geometry_get_unique_vertices_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -555,7 +555,7 @@ error:
res_T
sg3_geometry_get_unique_vertex
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
const unsigned ivtx,
double coord[3])
{
@@ -577,7 +577,7 @@ error:
res_T
sg3_geometry_get_unique_triangles_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -597,7 +597,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_vertices
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
const unsigned itri,
unsigned indices[3])
{
@@ -620,7 +620,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_properties
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
const unsigned itri,
unsigned properties[SG3_PROP_TYPES_COUNT__])
{
@@ -644,7 +644,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_global_id
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
const unsigned itri,
unsigned* global_id)
{
@@ -666,7 +666,7 @@ error:
res_T
sg3_geometry_get_triangle_with_undefined_side_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -683,7 +683,7 @@ error:
res_T
sg3_geometry_get_triangle_with_undefined_interface_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -700,7 +700,7 @@ error:
res_T
sg3_geometry_get_merge_conflict_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -717,7 +717,7 @@ error:
res_T
sg3_geometry_get_properties_conflict_count
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -734,7 +734,7 @@ error:
res_T
sg3_geometry_dump_as_obj
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
FILE* stream,
int flags)
{
@@ -785,7 +785,7 @@ error:
res_T
sg3_geometry_dump_as_vtk
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
FILE* stream)
{
res_T res = RES_OK;
@@ -874,7 +874,7 @@ error:
}
res_T
sg3_geometry_dump_as_C_code
- (const struct sg3* geom,
+ (const struct sg3_geometry* geom,
FILE* stream,
const char* name_prefix)
{
@@ -965,7 +965,7 @@ error:
}
res_T
-sg3_geometry_ref_get(struct sg3* geom)
+sg3_geometry_ref_get(struct sg3_geometry* geom)
{
if(!geom) return RES_BAD_ARG;
ref_get(&geom->ref);
@@ -973,7 +973,7 @@ sg3_geometry_ref_get(struct sg3* geom)
}
res_T
-sg3_geometry_ref_put(struct sg3* geom)
+sg3_geometry_ref_put(struct sg3_geometry* geom)
{
if(!geom) return RES_BAD_ARG;
ref_put(&geom->ref, geometry_release);
diff --git a/src/sg3_geometry.h b/src/sg3_geometry.h
@@ -228,7 +228,7 @@ init_trg_intfaceid
/*******************************************************************************
* Types to store geometry amid sg3_geometry_add calls.
******************************************************************************/
-struct sg3 {
+struct sg3_geometry {
/* Record unique (i.e. deduplicated) triangles */
struct darray_triangle unique_triangles;
/* Record coordinates for unique (i.e. deduplicated) vertices */
@@ -261,7 +261,7 @@ struct sg3 {
extern res_T
geometry_register_triangle
- (struct sg3* geometry,
+ (struct sg3_geometry* geometry,
const struct triangle* triangle,
const unsigned triangle_unique_id,
const unsigned set_id,
@@ -270,7 +270,7 @@ geometry_register_triangle
/* Add new undefined triangle descriptions to a geometry */
static res_T
geometry_enlarge_trg_descriptions
- (struct sg3* geom,
+ (struct sg3_geometry* geom,
const size_t sz)
{
res_T res = RES_OK;
diff --git a/src/test_sg3_geometry.c b/src/test_sg3_geometry.c
@@ -54,7 +54,7 @@ main(int argc, char** argv)
{
struct mem_allocator allocator;
struct sg3_device* dev;
- struct sg3* geom;
+ struct sg3_geometry* geom;
double coord[3];
unsigned indices[3];
unsigned properties[SG3_PROP_TYPES_COUNT__];
diff --git a/src/test_sg3_geometry_2.c b/src/test_sg3_geometry_2.c
@@ -93,7 +93,7 @@ main(int argc, char** argv)
{
struct mem_allocator allocator;
struct sg3_device* dev;
- struct sg3* geom;
+ struct sg3_geometry* geom;
struct context ctx;
struct add_geom_ctx add_geom_ctx;
unsigned property[12];