commit e6e9676cb13b11b9f0064713530a9b37f1139fc1
parent 4253d8ee91181875b85982fc59a96d192c8aaef9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 22 Jun 2016 17:41:02 +0200
Minor changes
Diffstat:
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/s3d_scene.c b/src/s3d_scene.c
@@ -42,7 +42,7 @@
#include <algorithm>
-/* Flag used to define session of enabled on instantiated scene */
+/* Flag used to define session enabled on instantiated scene */
#define S3D_INSTANCE (BIT(sizeof(int)*8 - 1))
struct ray_extended : public RTCRay {
@@ -192,7 +192,7 @@ scene_register_embree_geometry(struct s3d_scene* scn, struct geometry* geom)
}
if(geom->irtc >= darray_geom_size_get(&scn->embree2geoms)) {
- res_T res = darray_geom_resize(&scn->embree2geoms, geom->irtc + 1);
+ const res_T res = darray_geom_resize(&scn->embree2geoms, geom->irtc + 1);
if(res != RES_OK) {
rtcDeleteGeometry(scn->rtc_scn, geom->irtc);
geom->irtc = RTC_INVALID_GEOMETRY_ID;
@@ -282,7 +282,7 @@ scene_register_mesh
geom->data.mesh->indices = shape->data.mesh->indices;
}
- /* Get the reference onto the shape mesh attribs */
+ /* Get a reference onto the shape mesh attribs */
FOR_EACH(iattr, 0, S3D_ATTRIBS_COUNT__) {
if(geom->data.mesh->attribs[iattr] == shape->data.mesh->attribs[iattr])
continue;
@@ -819,12 +819,14 @@ s3d_scene_detach_shape(struct s3d_scene* scn, struct s3d_shape* shape)
if(!(S3D(shape_is_attached(shape, &is_attached)), is_attached))
return RES_BAD_ARG;
#ifndef NDEBUG
- { /* Check the the shape is attached to `scn' */
+ { /* Check that the shape is attached to `scn' */
struct list_node* node;
char is_found = 0;
LIST_FOR_EACH(node, &scn->shapes) {
- if(node == &shape->scene_attachment)
+ if(node == &shape->scene_attachment) {
is_found = 1;
+ break;
+ }
}
ASSERT(is_found);
}
diff --git a/src/s3d_scene_c.h b/src/s3d_scene_c.h
@@ -56,7 +56,7 @@ geom_ptr_init__(struct mem_allocator* alloc, struct geometry** geom)
#define DARRAY_FUNCTOR_INIT geom_ptr_init__
#include <rsys/dynamic_array.h>
-/* Generate the htable_mesh hash table */
+/* Generate the htable_geom hash table */
#define HTABLE_NAME geom
#define HTABLE_DATA struct geometry*
#define HTABLE_KEY struct s3d_shape*