зеркало из https://github.com/mozilla/gecko-dev.git
Bug 711491. Add a proper = operator to MapEntry. r=bgirard
This fixes us a bug where we weren't copying the data properly. --HG-- extra : rebase_source : a0331cf5d5b61c355447832119a6f7876922e190
This commit is contained in:
Родитель
c2a8e75a10
Коммит
b4de6c4581
|
@ -40,6 +40,15 @@ public:
|
|||
, mName(strdup(aEntry.mName))
|
||||
{}
|
||||
|
||||
MapEntry& operator=(const MapEntry& aEntry)
|
||||
{
|
||||
mStart = aEntry.mStart;
|
||||
mEnd = aEntry.mEnd;
|
||||
mOffset = aEntry.mOffset;
|
||||
mName = strdup(aEntry.mName);
|
||||
return *this;
|
||||
}
|
||||
|
||||
~MapEntry()
|
||||
{
|
||||
free(mName);
|
||||
|
@ -50,6 +59,8 @@ public:
|
|||
char* GetName() { return mName; }
|
||||
|
||||
private:
|
||||
explicit MapEntry() {}
|
||||
|
||||
unsigned long mStart;
|
||||
unsigned long mEnd;
|
||||
unsigned long mOffset;
|
||||
|
|
Загрузка…
Ссылка в новой задаче