зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348606 - Get rid of CSSVALUE_LIST_FOR_EXTRA_VALUES. r=xidorn
This makes it more annoying to put the class definition in a macro, which we do in the next patch. MozReview-Commit-ID: 443V7z4sMfi
This commit is contained in:
Родитель
24aabf9308
Коммит
c64223ca7c
|
@ -1098,30 +1098,27 @@ private:
|
|||
|
||||
const nsCSSValue* First() const { return mArray; }
|
||||
|
||||
#define CSSVALUE_LIST_FOR_EXTRA_VALUES(var) \
|
||||
for (nsCSSValue *var = First() + 1, *var##_end = First() + mCount; \
|
||||
var != var##_end; ++var)
|
||||
|
||||
explicit Array(size_t aItemCount)
|
||||
: mRefCnt(0)
|
||||
, mCount(aItemCount)
|
||||
: mCount(aItemCount)
|
||||
{
|
||||
CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
|
||||
for (nsCSSValue *val = First() + 1, *val_end = First() + mCount;
|
||||
val != val_end; ++val)
|
||||
{
|
||||
new (val) nsCSSValue();
|
||||
}
|
||||
}
|
||||
|
||||
~Array()
|
||||
{
|
||||
CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
|
||||
for (nsCSSValue *val = First() + 1, *val_end = First() + mCount;
|
||||
val != val_end; ++val)
|
||||
{
|
||||
val->~nsCSSValue();
|
||||
}
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||
|
||||
#undef CSSVALUE_LIST_FOR_EXTRA_VALUES
|
||||
|
||||
private:
|
||||
Array(const Array& aOther) = delete;
|
||||
Array& operator=(const Array& aOther) = delete;
|
||||
|
|
Загрузка…
Ссылка в новой задаче