Commit b7036d0c88498c43eb5b1674096d88cee5666f55

sammy 2009-07-19T14:26:13

Fix coding style and remove tabs here and there.

diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index b4a96dd..30f9793 100644
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -205,7 +205,7 @@ void FTFace::BuildKerningCache()
     kernAdvance.x = 0;
     kernAdvance.y = 0;
     kerningCache = new FTGL_DOUBLE[FTFace::MAX_PRECOMPUTED
-				   * FTFace::MAX_PRECOMPUTED * 2];
+                                    * FTFace::MAX_PRECOMPUTED * 2];
     for(unsigned int j = 0; j < FTFace::MAX_PRECOMPUTED; j++)
     {
         for(unsigned int i = 0; i < FTFace::MAX_PRECOMPUTED; i++)
diff --git a/src/FTGlyph/FTTextureGlyph.cpp b/src/FTGlyph/FTTextureGlyph.cpp
index 4450760..4e564b6 100644
--- a/src/FTGlyph/FTTextureGlyph.cpp
+++ b/src/FTGlyph/FTTextureGlyph.cpp
@@ -36,19 +36,21 @@
 #define FTGL_ASSERTS_SHOULD_SOFT_FAIL
 
 #ifdef FTGL_ASSERTS_SHOULD_SOFT_FAIL
-	#define FTASSERT(x) \
-		if (!(x)) \
-		{ \
-			fprintf(stderr,"ASSERTION FAILED (%s:%d)(soft): %s\n",__FILE__,__LINE__,#x); \
-		}
+#   define FTASSERT(x) \
+        if (!(x)) \
+        { \
+            fprintf(stderr, "ASSERTION FAILED (%s:%d)(soft): %s\n", \
+                    __FILE__, __LINE__, #x); \
+        }
 #else
-	#define FTASSERT(x) \
-		if (!(x)) \
-		{ \
-			fprintf(stderr,"ASSERTION FAILED (%s:%d): %s\n",__FILE__,__LINE__,#x); \
-			int *a = (int*)0x0; \
-			*a = 0xD15EA5ED; \
-		}
+#   define FTASSERT(x) \
+        if (!(x)) \
+        { \
+            fprintf(stderr, "ASSERTION FAILED (%s:%d): %s\n", \
+                    __FILE__, __LINE__, #x); \
+            int *a = (int*)0x0; \
+            *a = 0xD15EA5ED; \
+        }
 #endif
 
 
@@ -103,40 +105,42 @@ FTTextureGlyphImpl::FTTextureGlyphImpl(FT_GlyphSlot glyph, int id, int xOffset,
 
     if(destWidth && destHeight)
     {
-        glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); {
-
-            glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
-            glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
-            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
-	    glBindTexture(GL_TEXTURE_2D, glTextureID);
-	    GLint w,h;
-	    glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH,&w);
-	    glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_HEIGHT,&h);
-
-	    FTASSERT(xOffset >= 0);
-	    FTASSERT(yOffset >= 0);
-	    FTASSERT(destWidth >= 0);
-	    FTASSERT(destHeight >= 0);
-	    FTASSERT(xOffset+destWidth <= w);
-	    FTASSERT(yOffset+destHeight <= h);
-
-	    if (yOffset+destHeight > h)
-	    {
-	        //We'll only get here if we are soft-failing our asserts. In that case,
-	        //since the data we're trying to put into our texture is too long,
-	        //we'll only copy a portion of the image.
-	        destHeight = h-yOffset;
-	    }
-	    if (destHeight >= 0)
-	    {
-	        glTexSubImage2D(GL_TEXTURE_2D, 0, xOffset, yOffset, destWidth, destHeight, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap.buffer);
-	    }
-
-	} glPopClientAttrib();
+        glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+
+        glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
+        glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
+        GLint w,h;
+
+        glBindTexture(GL_TEXTURE_2D, glTextureID);
+        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &w);
+        glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &h);
+
+        FTASSERT(xOffset >= 0);
+        FTASSERT(yOffset >= 0);
+        FTASSERT(destWidth >= 0);
+        FTASSERT(destHeight >= 0);
+        FTASSERT(xOffset + destWidth <= w);
+        FTASSERT(yOffset + destHeight <= h);
+
+        if (yOffset + destHeight > h)
+        {
+            // We'll only get here if we are soft-failing our asserts. In that
+            // case, since the data we're trying to put into our texture is
+            // too long, we'll only copy a portion of the image.
+            destHeight = h - yOffset;
+        }
+        if (destHeight >= 0)
+        {
+            glTexSubImage2D(GL_TEXTURE_2D, 0, xOffset, yOffset,
+                            destWidth, destHeight, GL_ALPHA, GL_UNSIGNED_BYTE,
+                            bitmap.buffer);
+        }
+
+        glPopClientAttrib();
     }
 
-
 //      0
 //      +----+
 //      |    |