default smart pointer type switched to intrusive_ptr

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@337 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-11 21:34:53 +00:00
parent 3b6743b110
commit 33fd2b5e18
103 changed files with 368 additions and 256 deletions
+3 -3
View File
@@ -383,7 +383,7 @@ class ApprCardDatabase : public ApprDatabase {
/** Each card has two records, a data record at the top of the file
* and a head record at the bottom
*/
class ApprCardRecord {
class ApprCardRecord : public IntrusivePtrBase<ApprCardRecord> {
public:
String name, sets;
String type, cc, pt, text, flavor;
@@ -536,7 +536,7 @@ void ApprCardDatabase::doRead(wxInputStream& in) {
progress_target->onProgress(0.4f * float(i) / cards.size(),
String(_("reading card ")) << i << _(" of ") << (int)cards.size());
}
card = new_shared<ApprCardRecord>();
card = new_intrusive<ApprCardRecord>();
card->readHead(data);
head_pos = in.TellI();
in.SeekI(card->data_pos);
@@ -751,7 +751,7 @@ bool ApprenticeExportWindow::exportSet() {
cardlist.removeSet(set->apprentice_code);
// add cards from set
FOR_EACH(card, set->cards) {
ApprCardRecordP rec = new_shared2<ApprCardRecord>(*card, set->apprentice_code);
ApprCardRecordP rec = new_intrusive2<ApprCardRecord>(*card, set->apprentice_code);
cardlist.cards.push_back(rec);
}
cardlist.write();