code cleanup: quiet struct gcc warnings, also use more conventional names for bmesh...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 12 Mar 2013 08:50:02 +0000 (08:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 12 Mar 2013 08:50:02 +0000 (08:50 +0000)
source/blender/bmesh/tools/bmesh_decimate_dissolve.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_simple_shader.c

index 4be70b7..a5122b2 100644 (file)
@@ -114,14 +114,14 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, const float angle_limit, const bool
                            /* check twice because cumulative effect could dissolve over angle limit */
                            (BM_edge_calc_face_angle(e) < angle_limit))
                        {
-                               BMFace *nf = BM_faces_join_pair(bm, e->l->f,
-                                                               e->l->radial_next->f,
-                                                               e,
-                                                               false); /* join faces */
+                               BMFace *f_new = BM_faces_join_pair(bm, e->l->f,
+                                                                  e->l->radial_next->f,
+                                                                  e,
+                                                                  false); /* join faces */
 
                                /* there may be some errors, we don't mind, just move on */
-                               if (nf) {
-                                       BM_face_normal_update(nf);
+                               if (f_new) {
+                                       BM_face_normal_update(f_new);
                                }
                                else {
                                        BMO_error_clear(bm);
index bcf86be..fd67144 100644 (file)
@@ -1265,7 +1265,7 @@ void GPU_shader_bind(GPUShader *shader)
        GPU_print_error("Post Shader Bind");
 }
 
-void GPU_shader_unbind()
+void GPU_shader_unbind(void)
 {
        GPU_print_error("Pre Shader Unbind");
        glUseProgramObjectARB(0);
index 54509d5..b29d6c2 100644 (file)
@@ -70,12 +70,12 @@ static struct {
 
 /* Init / exit */
 
-void GPU_simple_shaders_init()
+void GPU_simple_shaders_init(void)
 {
        memset(&GPU_MATERIAL_STATE, 0, sizeof(GPU_MATERIAL_STATE));
 }
 
-void GPU_simple_shaders_exit()
+void GPU_simple_shaders_exit(void)
 {
        int i;
        
@@ -203,7 +203,7 @@ void GPU_simple_shader_bind(int options)
        GPU_MATERIAL_STATE.need_normals = (options & GPU_SHADER_LIGHTING);
 }
 
-void GPU_simple_shader_unbind()
+void GPU_simple_shader_unbind(void)
 {
        if (GPU_glsl_support()) {
                GPU_shader_unbind();
@@ -234,7 +234,7 @@ void GPU_simple_shader_colors(const float diffuse[3], const float specular[3],
        glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, CLAMPIS(shininess, 1, 128));
 }
 
-bool GPU_simple_shader_need_normals()
+bool GPU_simple_shader_need_normals(void)
 {
        return GPU_MATERIAL_STATE.need_normals;
 }