SearchSet: Get rid of SharedPtr usage
|Reported by:||lordhoto||Owned by:||lordhoto|
this patch removes the ArchivePtr parameter in SearchSet::add and replaces it with a plain pointer + bool variable which indicates if the given pointer should be freed on deletion. The 'autoFree' flag is true on default. We might want to check about this.
One of the reasons for that change is that now I'm able to add SearchMan to my own SearchSet in KYRA (Fixes bug #2103506 "KYRA: Kyra.dat is not search in all dirs anymore"). Also some code in PARALLACTION is now simplified, instead of first creating a ArchivePtr and then passing it to SearchSet::add, now PARALLACTION can simply use "_sset.add("part", _baseDir->getSubDirectory(name, 3), 10);". It might help in other cases too. So all in all it should get rid of the overhead of SharedPtr in this case and ease use of own SearchSet in conjunction with SearchMan.
Ticket imported from: #2184529. Ticket imported from: patches/1036.
Change History (9)
comment:5 by , 12 years ago
|Status:||new → closed|
|Summary:||SearchSet: Get rid of SharedPtr usage → "|