[mapserver-commits] r8507 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Feb 5 14:36:50 EST 2009


Author: pramsey
Date: 2009-02-05 14:36:50 -0500 (Thu, 05 Feb 2009)
New Revision: 8507

Modified:
   trunk/mapserver/mappostgis.c
Log:
Small performance tweak to b64 decode.


Modified: trunk/mapserver/mappostgis.c
===================================================================
--- trunk/mapserver/mappostgis.c	2009-02-05 17:20:18 UTC (rev 8506)
+++ trunk/mapserver/mappostgis.c	2009-02-05 19:36:50 UTC (rev 8507)
@@ -731,10 +731,8 @@
 
         /* Drop illegal chars first */
         for (i=0, j=0; src[i]; i++) {
-            char c = src[i];
-            if ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
-                    (c >= '0' && c <= '9') ||
-                    (c == '+') || (c == '/') || (c == '=')) {
+            unsigned char c = src[i];
+            if ( (msPostGISBase64DecodeChar[c] != 63) || (c == '/') || (c == '=')) {
                 buf[j++] = c;
             }
         }



More information about the mapserver-commits mailing list