From 41006ecdd04b1867a5bd5a11e9be67dd8a0bc205 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Wed, 6 Jul 2005 19:49:36 +0000 Subject: [PATCH] Fixed Bug 100640 - Indexer encoding/decoding optimizations --- .../core/browser/cache/IndexerTypesJob2.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java index c7dc8601e81..7956dc62808 100644 --- a/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java +++ b/core/org.eclipse.cdt.core/browser/org/eclipse/cdt/internal/core/browser/cache/IndexerTypesJob2.java @@ -160,8 +160,18 @@ public class IndexerTypesJob2 extends IndexerJob2 { // } final IPath workspaceRelativePath = PathUtil.getWorkspaceRelativePath(pth); int offset = entry.getOffsets()[0][0]; - int offsetType = Integer.valueOf(String.valueOf(offset).substring(0,1)).intValue(); - int value = Integer.valueOf(String.valueOf(offset).substring(1)).intValue(); +// int offsetType = Integer.valueOf(String.valueOf(offsets[i][j]).substring(0,1)).intValue(); + int offsetType = offset; + int m = 1; + while (offsetType >= 10) { + offsetType = offsetType / 10; + m *= 10; + } + int mod = 1; + while( offset / ( mod * 10 )> 0 ) + mod *= 10; + int value = offset % mod; +// int value = Integer.valueOf(String.valueOf(offset).substring(1)).intValue(); TypeReference typeReference = null; if (offsetType==IIndex.LINE){