From 4afae71c5f8c8148b38e8871e5b7f9a024782f30 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 30 Nov 2009 09:40:17 -0600 Subject: [PATCH 2/5] ole32: Take a StorageBaseImpl in insertIntoTree. --- dlls/ole32/storage32.c | 58 ++++++++++++++++++++++++------------------------ 1 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 2015eaf..5a7f6d9 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -189,7 +189,7 @@ static HRESULT destroyDirEntry( DirRef index); static HRESULT insertIntoTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef newEntryIndex); @@ -779,7 +779,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( ¤tEntry); /* Insert the element in a new position in the tree */ - insertIntoTree(This->ancestorStorage, This->storageDirEntry, + insertIntoTree(This, This->storageDirEntry, currentEntryRef); } else @@ -920,7 +920,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( * Insert the new entry in the parent storage's tree. */ insertIntoTree( - This->ancestorStorage, + This, This->storageDirEntry, newStreamEntryRef); @@ -1108,7 +1108,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage( * Insert the new directory entry into the parent storage's tree */ insertIntoTree( - This->ancestorStorage, + This, This->storageDirEntry, newEntryRef); @@ -1294,7 +1294,7 @@ static LONG entryNameCmp( * Add a directory entry to a storage */ static HRESULT insertIntoTree( - StorageImpl *This, + StorageBaseImpl *This, DirRef parentStorageIndex, DirRef newEntryIndex) { @@ -1304,16 +1304,16 @@ static HRESULT insertIntoTree( /* * Read the inserted entry */ - StorageImpl_ReadDirEntry(This, - newEntryIndex, - &newEntry); + StorageBaseImpl_ReadDirEntry(This, + newEntryIndex, + &newEntry); /* * Read the storage entry */ - StorageImpl_ReadDirEntry(This, - parentStorageIndex, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + parentStorageIndex, + ¤tEntry); if (currentEntry.dirRootEntry != DIRENTRY_NULL) { @@ -1332,9 +1332,9 @@ static HRESULT insertIntoTree( /* * Read */ - StorageImpl_ReadDirEntry(This, - currentEntry.dirRootEntry, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + currentEntry.dirRootEntry, + ¤tEntry); previous = currentEntry.leftChild; next = currentEntry.rightChild; @@ -1348,17 +1348,17 @@ static HRESULT insertIntoTree( { if (previous != DIRENTRY_NULL) { - StorageImpl_ReadDirEntry(This, - previous, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + previous, + ¤tEntry); current = previous; } else { currentEntry.leftChild = newEntryIndex; - StorageImpl_WriteDirEntry(This, - current, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + current, + ¤tEntry); found = 1; } } @@ -1366,17 +1366,17 @@ static HRESULT insertIntoTree( { if (next != DIRENTRY_NULL) { - StorageImpl_ReadDirEntry(This, - next, - ¤tEntry); + StorageBaseImpl_ReadDirEntry(This, + next, + ¤tEntry); current = next; } else { currentEntry.rightChild = newEntryIndex; - StorageImpl_WriteDirEntry(This, - current, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + current, + ¤tEntry); found = 1; } } @@ -1399,9 +1399,9 @@ static HRESULT insertIntoTree( * The storage is empty, make the new entry the root of its element tree */ currentEntry.dirRootEntry = newEntryIndex; - StorageImpl_WriteDirEntry(This, - parentStorageIndex, - ¤tEntry); + StorageBaseImpl_WriteDirEntry(This, + parentStorageIndex, + ¤tEntry); } return S_OK; -- 1.6.3.3