Changeset 14788
- Timestamp:
- 06/30/08 15:08:40 (5 months ago)
- Files:
-
- trunk/gdal/port/cpl_minixml.cpp (modified) (6 diffs)
- trunk/gdal/port/cpl_port.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/port/cpl_minixml.cpp
r14785 r14788 89 89 /************************************************************************/ 90 90 91 static char ReadChar( ParseContext *psContext )91 static CPL_INLINE char ReadChar( ParseContext *psContext ) 92 92 93 93 { … … 108 108 /************************************************************************/ 109 109 110 static void UnreadChar( ParseContext *psContext, char chToUnread )110 static CPL_INLINE void UnreadChar( ParseContext *psContext, char chToUnread ) 111 111 112 112 { … … 131 131 /************************************************************************/ 132 132 133 static void AddToToken( ParseContext *psContext, char chNewChar )133 static CPL_INLINE void AddToToken( ParseContext *psContext, char chNewChar ) 134 134 135 135 { … … 1173 1173 1174 1174 { 1175 char *apszTokens[2]; 1175 1176 char **papszTokens; 1176 1177 int iToken = 0; … … 1186 1187 } 1187 1188 1188 papszTokens = CSLTokenizeStringComplex( pszPath, ".", FALSE, FALSE ); 1189 /* Slight optimization : avoid using CSLTokenizeStringComplex that */ 1190 /* does memory allocations when it is not really necessary */ 1191 if (strchr(pszPath, '.')) 1192 papszTokens = CSLTokenizeStringComplex( pszPath, ".", FALSE, FALSE ); 1193 else 1194 { 1195 apszTokens[0] = (char*) pszPath; 1196 apszTokens[1] = NULL; 1197 papszTokens = apszTokens; 1198 } 1189 1199 1190 1200 while( papszTokens[iToken] != NULL && psRoot != NULL ) … … 1217 1227 } 1218 1228 1219 CSLDestroy( papszTokens ); 1229 if (papszTokens != apszTokens) 1230 CSLDestroy( papszTokens ); 1220 1231 return psRoot; 1221 1232 } trunk/gdal/port/cpl_port.h
r14473 r14788 234 234 #else 235 235 # define FORCE_CDECL 236 #endif 237 238 /* TODO : support for other compilers needed */ 239 #if defined(__GNUC__) 240 #define CPL_INLINE inline 236 241 #endif 237 242
