Bug 975823, part 13 - Make BFSTableData::predecessor into an AutoPtr. r=mcmanus

This commit is contained in:
Andrew McCreight 2014-03-21 09:43:41 -07:00
parent 93825660be
commit 803708b41f

View File

@ -20,6 +20,7 @@
#include "nsStreamConverterService.h"
#include "nsIComponentRegistrar.h"
#include "nsAutoPtr.h"
#include "nsString.h"
#include "nsIAtom.h"
#include "nsDeque.h"
@ -55,16 +56,12 @@ struct BFSTableData {
nsCStringKey *key;
BFScolors color;
int32_t distance;
nsCStringKey *predecessor;
nsAutoPtr<nsCStringKey> predecessor;
explicit BFSTableData(nsCStringKey* aKey)
: key(aKey), color(white), distance(-1), predecessor(nullptr)
: key(aKey), color(white), distance(-1)
{
}
~BFSTableData() {
delete predecessor;
}
};
////////////////////////////////////////////////////////////