michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: nsHtml5UTF16Buffer::nsHtml5UTF16Buffer(char16_t* aBuffer, int32_t aEnd) michael@0: : buffer(aBuffer) michael@0: , start(0) michael@0: , end(aEnd) michael@0: { michael@0: MOZ_COUNT_CTOR(nsHtml5UTF16Buffer); michael@0: } michael@0: michael@0: nsHtml5UTF16Buffer::~nsHtml5UTF16Buffer() michael@0: { michael@0: MOZ_COUNT_DTOR(nsHtml5UTF16Buffer); michael@0: } michael@0: michael@0: void michael@0: nsHtml5UTF16Buffer::DeleteBuffer() michael@0: { michael@0: delete[] buffer; michael@0: } michael@0: michael@0: void michael@0: nsHtml5UTF16Buffer::Swap(nsHtml5UTF16Buffer* aOther) michael@0: { michael@0: char16_t* tempBuffer = buffer; michael@0: int32_t tempStart = start; michael@0: int32_t tempEnd = end; michael@0: buffer = aOther->buffer; michael@0: start = aOther->start; michael@0: end = aOther->end; michael@0: aOther->buffer = tempBuffer; michael@0: aOther->start = tempStart; michael@0: aOther->end = tempEnd; michael@0: }