Module: wine Branch: master Commit: 4ad114cfaef87c885231021272ac548766d4393b URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ad114cfaef87c885231021272...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu May 6 11:35:56 2010 -0500
ole32: Use the cached information in BlockChainStream_GetCount.
---
dlls/ole32/storage32.c | 20 +------------------- 1 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 8bae897..9ac794e 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -5786,28 +5786,10 @@ static ULONG BlockChainStream_GetHeadOfChain(BlockChainStream* This) * * Returns the number of blocks that comprises this chain. * This is not the size of the stream as the last block may not be full! - * - * FIXME: Use the cache to get this information. */ static ULONG BlockChainStream_GetCount(BlockChainStream* This) { - ULONG blockIndex; - ULONG count = 0; - - blockIndex = BlockChainStream_GetHeadOfChain(This); - - while (blockIndex != BLOCK_END_OF_CHAIN) - { - count++; - - if(FAILED(StorageImpl_GetNextBlockInChain( - This->parentStorage, - blockIndex, - &blockIndex))) - return 0; - } - - return count; + return This->numBlocks; }
/******************************************************************************