@@ -120,10 +120,10 @@ void CJHBlockCompressedSearchNode::load(CKeyHdr *_keyHdr, const void *rawData, o
120120 CompressionMethod compressionMethod = *(CompressionMethod*) keys;
121121 keys += sizeof (CompressionMethod);
122122
123- hasFilePosition = *(bool *) keys;
123+ zeroFilePosition = *(bool *) keys;
124124 keys += sizeof (bool );
125125
126- keyRecLen = hasFilePosition ? (keyLen + sizeof (offset_t )) : keyLen;
126+ keyRecLen = zeroFilePosition ? (keyLen + sizeof (offset_t )) : keyLen;
127127
128128 CCycleTimer expansionTimer (true );
129129 keyBuf = expandBlock (keys, inMemorySize, compressionMethod);
@@ -143,7 +143,7 @@ bool CJHBlockCompressedSearchNode::fetchPayload(unsigned int index, char *dst, P
143143 const char * p = keyBuf + index*keyRecLen;
144144 if (keyHdr->hasSpecialFileposition ())
145145 {
146- if (hasFilePosition )
146+ if (zeroFilePosition )
147147 memcpy (dst+keyCompareLen, p+keyCompareLen, keyLen + sizeof (offset_t ) - keyCompareLen);
148148 else
149149 {
@@ -173,10 +173,7 @@ size32_t CJHBlockCompressedSearchNode::getSizeAt(unsigned int index) const
173173{
174174 if (keyHdr->hasSpecialFileposition ())
175175 {
176- if (hasFilePosition)
177- return keyLen + sizeof (offset_t );
178- else
179- return keyLen;
176+ return keyLen + sizeof (offset_t );
180177 }
181178 else
182179 return keyLen;
@@ -185,7 +182,7 @@ size32_t CJHBlockCompressedSearchNode::getSizeAt(unsigned int index) const
185182offset_t CJHBlockCompressedSearchNode::getFPosAt (unsigned int index) const
186183{
187184 if (index >= hdr.numKeys ) return 0 ;
188- if (!hasFilePosition ) return 0 ;
185+ if (!zeroFilePosition ) return 0 ;
189186
190187 offset_t pos;
191188 const char * p = keyBuf + index*keyRecLen + keyLen;
@@ -294,7 +291,7 @@ void CBlockCompressedWriteNode::finalize()
294291{
295292 compressor.close ();
296293 if (hdr.numKeys )
297- hdr.keyBytes = compressor.buflen () + sizeof (unsigned __int64) + sizeof (CompressionMethod) + sizeof (bool ); // rsequence + compressionMethod + hasFilePosition
294+ hdr.keyBytes = compressor.buflen () + sizeof (unsigned __int64) + sizeof (CompressionMethod) + sizeof (bool ); // rsequence + compressionMethod + zeroFilePosition
298295}
299296
300297BlockCompressedIndexCompressor::BlockCompressedIndexCompressor (unsigned keyedSize, IHThorIndexWriteArg *helper, const char * options)
@@ -349,7 +346,7 @@ void CJHBlockCompressedVarNode::load(CKeyHdr *_keyHdr, const void *rawData, offs
349346 KEYRECSIZE_T recsize = *(KEYRECSIZE_T *)finger;
350347 _WINREV (recsize);
351348 finger += recsize + sizeof (KEYRECSIZE_T);
352- if (hasFilePosition )
349+ if (zeroFilePosition )
353350 finger += sizeof (offset_t );
354351 }
355352}
@@ -370,7 +367,7 @@ bool CJHBlockCompressedVarNode::fetchPayload(unsigned int num, char *dst, Payloa
370367 _WINREV (reclen);
371368 if (keyHdr->hasSpecialFileposition ())
372369 {
373- if (hasFilePosition )
370+ if (zeroFilePosition )
374371 memcpy (dst+keyCompareLen, p+keyCompareLen, reclen + sizeof (offset_t ) - keyCompareLen);
375372 else
376373 {
@@ -413,7 +410,7 @@ size32_t CJHBlockCompressedVarNode::getSizeAt(unsigned int num) const
413410offset_t CJHBlockCompressedVarNode::getFPosAt (unsigned int num) const
414411{
415412 if (num >= hdr.numKeys ) return 0 ;
416- if (!hasFilePosition ) return 0 ;
413+ if (!zeroFilePosition ) return 0 ;
417414
418415 const char * p = recArray[num];
419416 KEYRECSIZE_T reclen = ((KEYRECSIZE_T *) p)[-1 ];
0 commit comments