Revision: 40200
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40200
Author:   campbellbarton
Date:     2011-09-14 02:45:44 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
minor edits to ascii draw function, unused var warning.

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

Modified: trunk/blender/source/blender/blenfont/intern/blf_font.c
===================================================================
--- trunk/blender/source/blender/blenfont/intern/blf_font.c     2011-09-14 
02:04:26 UTC (rev 40199)
+++ trunk/blender/source/blender/blenfont/intern/blf_font.c     2011-09-14 
02:45:44 UTC (rev 40200)
@@ -99,9 +99,10 @@
 
 static void blf_font_ensure_ascii_table(FontBLF *font)
 {
+       GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
        /* build ascii on demand */
-       if(font->glyph_cache->glyph_ascii_table['0']==NULL) {
-               GlyphBLF **glyph_ascii_table= 
font->glyph_cache->glyph_ascii_table;
+       if(glyph_ascii_table['0']==NULL) {
                GlyphBLF *g;
                unsigned int i;
                for(i=0; i<256; i++) {
@@ -125,7 +126,7 @@
 
 #define BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table)             \
        if(((c)= (str)[i]) < 0x80) {                                            
  \
-               g= glyph_ascii_table[c];                                        
      \
+               g= (glyph_ascii_table)[c];                                      
      \
                i++;                                                            
      \
        }                                                                       
  \
        else if ((c= blf_utf8_next((unsigned char *)(str), &(i)))) {            
  \
@@ -212,7 +213,7 @@
        blf_font_ensure_ascii_table(font);
 
        while ((c= *(str++)) && len--) {
-               g= font->glyph_cache->glyph_ascii_table[c];
+               g= glyph_ascii_table[c];
 
                /* if we don't found a glyph, skip it. */
                if (!g)
@@ -401,7 +402,6 @@
 
        if (!font->glyph_cache)
                return;
-       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        box->xmin= 32000.0f;
        box->xmax= -32000.0f;
@@ -415,6 +415,7 @@
        g_prev= NULL;
 
        blf_font_ensure_ascii_table(font);
+       glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
 
        while (str[i]) {
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to