2012-05-29 16:52:43 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-29 00:44:22 +02:00
|
|
|
|
2011-09-28 15:45:17 +03:00
|
|
|
nsHtml5UTF16Buffer::nsHtml5UTF16Buffer(PRUnichar* aBuffer, PRInt32 aEnd)
|
|
|
|
: buffer(aBuffer)
|
|
|
|
, start(0)
|
|
|
|
, end(aEnd)
|
2009-06-29 00:44:22 +02:00
|
|
|
{
|
|
|
|
MOZ_COUNT_CTOR(nsHtml5UTF16Buffer);
|
|
|
|
}
|
|
|
|
|
|
|
|
nsHtml5UTF16Buffer::~nsHtml5UTF16Buffer()
|
|
|
|
{
|
|
|
|
MOZ_COUNT_DTOR(nsHtml5UTF16Buffer);
|
|
|
|
}
|
2009-10-12 16:08:04 +03:00
|
|
|
|
2011-09-28 15:45:17 +03:00
|
|
|
void
|
|
|
|
nsHtml5UTF16Buffer::DeleteBuffer()
|
2009-10-12 16:08:04 +03:00
|
|
|
{
|
2011-09-28 15:45:17 +03:00
|
|
|
delete[] buffer;
|
2009-10-12 16:08:04 +03:00
|
|
|
}
|
2011-10-29 23:14:31 +03:00
|
|
|
|
|
|
|
void
|
|
|
|
nsHtml5UTF16Buffer::Swap(nsHtml5UTF16Buffer* aOther)
|
|
|
|
{
|
|
|
|
PRUnichar* tempBuffer = buffer;
|
|
|
|
PRInt32 tempStart = start;
|
|
|
|
PRInt32 tempEnd = end;
|
|
|
|
buffer = aOther->buffer;
|
|
|
|
start = aOther->start;
|
|
|
|
end = aOther->end;
|
|
|
|
aOther->buffer = tempBuffer;
|
|
|
|
aOther->start = tempStart;
|
|
|
|
aOther->end = tempEnd;
|
|
|
|
}
|