mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 11:07:29 +09:00
Make nsScannerIterator a trivial type in order to use memset
This commit is contained in:
parent
59440a335d
commit
36607675b2
1 changed files with 9 additions and 9 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
* to live in xpcom/string. Now that nsAString is limited to representing
|
* to live in xpcom/string. Now that nsAString is limited to representing
|
||||||
* only single fragment strings, nsSlidingString can no longer be used.
|
* only single fragment strings, nsSlidingString can no longer be used.
|
||||||
*
|
*
|
||||||
* An advantage to this design is that it does not employ any virtual
|
* An advantage to this design is that it does not employ any virtual
|
||||||
* functions.
|
* functions.
|
||||||
*
|
*
|
||||||
* This file uses SCC-style indenting in deference to the nsSlidingString
|
* This file uses SCC-style indenting in deference to the nsSlidingString
|
||||||
|
|
@ -103,12 +103,12 @@ class nsScannerBufferList
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Position() {}
|
Position() {}
|
||||||
|
|
||||||
Position( Buffer* buffer, char16_t* position )
|
Position( Buffer* buffer, char16_t* position )
|
||||||
: mBuffer(buffer)
|
: mBuffer(buffer)
|
||||||
, mPosition(position)
|
, mPosition(position)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
inline
|
inline
|
||||||
explicit Position( const nsScannerIterator& aIter );
|
explicit Position( const nsScannerIterator& aIter );
|
||||||
|
|
||||||
|
|
@ -133,7 +133,7 @@ class nsScannerBufferList
|
||||||
void AddRef() { ++mRefCnt; }
|
void AddRef() { ++mRefCnt; }
|
||||||
void Release() { if (--mRefCnt == 0) delete this; }
|
void Release() { if (--mRefCnt == 0) delete this; }
|
||||||
|
|
||||||
void Append( Buffer* buf ) { mBuffers.insertBack(buf); }
|
void Append( Buffer* buf ) { mBuffers.insertBack(buf); }
|
||||||
void InsertAfter( Buffer* buf, Buffer* prev ) { prev->setNext(buf); }
|
void InsertAfter( Buffer* buf, Buffer* prev ) { prev->setNext(buf); }
|
||||||
void SplitBuffer( const Position& );
|
void SplitBuffer( const Position& );
|
||||||
void DiscardUnreferencedPrefix( Buffer* );
|
void DiscardUnreferencedPrefix( Buffer* );
|
||||||
|
|
@ -223,7 +223,7 @@ class nsScannerSubstring
|
||||||
mBufferList->Release();
|
mBufferList->Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_range_from_buffer_list()
|
void init_range_from_buffer_list()
|
||||||
{
|
{
|
||||||
mStart.mBuffer = mBufferList->Head();
|
mStart.mBuffer = mBufferList->Head();
|
||||||
|
|
@ -340,7 +340,7 @@ class nsScannerIterator
|
||||||
friend class nsScannerSharedSubstring;
|
friend class nsScannerSharedSubstring;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
nsScannerIterator() {}
|
// nsScannerIterator(); // auto-generate default constructor is OK
|
||||||
// nsScannerIterator( const nsScannerIterator& ); // auto-generated copy-constructor OK
|
// nsScannerIterator( const nsScannerIterator& ); // auto-generated copy-constructor OK
|
||||||
// nsScannerIterator& operator=( const nsScannerIterator& ); // auto-generated copy-assignment operator OK
|
// nsScannerIterator& operator=( const nsScannerIterator& ); // auto-generated copy-assignment operator OK
|
||||||
|
|
||||||
|
|
@ -351,7 +351,7 @@ class nsScannerIterator
|
||||||
{
|
{
|
||||||
return mPosition;
|
return mPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
char16_t operator*() const
|
char16_t operator*() const
|
||||||
{
|
{
|
||||||
return *get();
|
return *get();
|
||||||
|
|
@ -467,7 +467,7 @@ struct nsCharSourceTraits<nsScannerIterator>
|
||||||
{
|
{
|
||||||
return iter.get();
|
return iter.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
advance( nsScannerIterator& s, difference_type n )
|
advance( nsScannerIterator& s, difference_type n )
|
||||||
|
|
@ -593,7 +593,7 @@ RFindInReadable( const nsAString& aPattern,
|
||||||
|
|
||||||
inline
|
inline
|
||||||
bool
|
bool
|
||||||
CaseInsensitiveFindInReadable( const nsAString& aPattern,
|
CaseInsensitiveFindInReadable( const nsAString& aPattern,
|
||||||
nsScannerIterator& aStart,
|
nsScannerIterator& aStart,
|
||||||
nsScannerIterator& aEnd )
|
nsScannerIterator& aEnd )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue