[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50073] trunk/blender/source/blender/ blenfont/intern: code cleanup: includes and correction for macro

Campbell Barton ideasman42 at gmail.com
Tue Aug 21 11:45:31 CEST 2012


Revision: 50073
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50073
Author:   campbellbarton
Date:     2012-08-21 09:45:30 +0000 (Tue, 21 Aug 2012)
Log Message:
-----------
code cleanup: includes and correction for macro

Modified Paths:
--------------
    trunk/blender/source/blender/blenfont/intern/blf_dir.c
    trunk/blender/source/blender/blenfont/intern/blf_font.c
    trunk/blender/source/blender/blenfont/intern/blf_glyph.c

Modified: trunk/blender/source/blender/blenfont/intern/blf_dir.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_dir.c	2012-08-21 09:20:35 UTC (rev 50072)
+++ trunk/blender/source/blender/blenfont/intern/blf_dir.c	2012-08-21 09:45:30 UTC (rev 50073)
@@ -43,7 +43,10 @@
 
 #include "BKE_utildefines.h"
 
-#include "BLI_blenlib.h"
+#include "BLI_fileops.h"
+#include "BLI_listbase.h"
+#include "BLI_path_util.h"
+#include "BLI_string.h"
 
 #include "BIF_gl.h"
 

Modified: trunk/blender/source/blender/blenfont/intern/blf_font.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_font.c	2012-08-21 09:20:35 UTC (rev 50072)
+++ trunk/blender/source/blender/blenfont/intern/blf_font.c	2012-08-21 09:45:30 UTC (rev 50073)
@@ -43,10 +43,12 @@
 
 #include "DNA_vec_types.h"
 
-
-#include "BLI_blenlib.h"
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_rect.h"
+#include "BLI_string.h"
+#include "BLI_string_utf8.h"
 #include "BLI_linklist.h"  /* linknode */
-#include "BLI_math.h"
 
 #include "BIF_gl.h"
 #include "BLF_api.h"
@@ -152,7 +154,7 @@
 		                   _kern_mode,                                           \
 		                   &(_delta)) == 0)                                      \
 		{                                                                        \
-			_pen_x += delta.x >> 6;                                              \
+			_pen_x += _delta.x >> 6;                                             \
 		}                                                                        \
 	}                                                                            \
 } (void)0

Modified: trunk/blender/source/blender/blenfont/intern/blf_glyph.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_glyph.c	2012-08-21 09:20:35 UTC (rev 50072)
+++ trunk/blender/source/blender/blenfont/intern/blf_glyph.c	2012-08-21 09:45:30 UTC (rev 50073)
@@ -46,7 +46,8 @@
 #include "DNA_vec_types.h"
 #include "DNA_userdef_types.h"
 
-#include "BLI_blenlib.h"
+#include "BLI_listbase.h"
+#include "BLI_rect.h"
 
 #include "BIF_gl.h"
 #include "BLF_api.h"
@@ -314,13 +315,14 @@
 
 static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
-	float soft[25] = {1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f,
-	                  1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
-	                  2 / 60.0f, 5 / 60.0f, 8 / 60.0f, 5 / 60.0f, 2 / 60.0f,
-	                  1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
-	                  1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f};
+	const float soft[25] = {1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f,
+	                        1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
+	                        2 / 60.0f, 5 / 60.0f, 8 / 60.0f, 5 / 60.0f, 2 / 60.0f,
+	                        1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
+	                        1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f};
 	
-	float color[4], *fp = soft;
+	const float *fp = soft;
+	float color[4];
 	int dx, dy;
 
 	color[0] = shadow_col[0];
@@ -340,11 +342,12 @@
 
 static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
-	float soft[9] = {1 / 16.0f, 2 / 16.0f, 1 / 16.0f,
-	                 2 / 16.0f, 4 / 16.0f, 2 / 16.0f,
-	                 1 / 16.0f, 2 / 16.0f, 1 / 16.0f};
+	const float soft[9] = {1 / 16.0f, 2 / 16.0f, 1 / 16.0f,
+	                       2 / 16.0f, 4 / 16.0f, 2 / 16.0f,
+	                       1 / 16.0f, 2 / 16.0f, 1 / 16.0f};
 
-	float color[4], *fp = soft;
+	const float *fp = soft;
+	float color[4];
 	int dx, dy;
 
 	color[0] = shadow_col[0];




More information about the Bf-blender-cvs mailing list