mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1035884 - Follow-up: Remove SubstringType template argument for ns{CharSeparated,Whitespace}Tokenizer. r=froydnj
This commit is contained in:
parent
2339628644
commit
079b2e7778
@ -29,12 +29,11 @@
|
||||
* The function used for whitespace detection is a template argument.
|
||||
* By default, it is NS_IsAsciiWhitespace.
|
||||
*/
|
||||
template<typename SubstringType,
|
||||
typename DependentSubstringType,
|
||||
bool IsWhitespace(char16_t)>
|
||||
template<typename DependentSubstringType, bool IsWhitespace(char16_t)>
|
||||
class nsTCharSeparatedTokenizer
|
||||
{
|
||||
typedef typename SubstringType::char_type CharType;
|
||||
typedef typename DependentSubstringType::char_type CharType;
|
||||
typedef typename DependentSubstringType::substring_type SubstringType;
|
||||
|
||||
public:
|
||||
// Flags -- only one for now. If we need more, they should be defined to
|
||||
@ -166,16 +165,13 @@ private:
|
||||
|
||||
template<bool IsWhitespace(char16_t) = NS_IsAsciiWhitespace>
|
||||
class nsCharSeparatedTokenizerTemplate
|
||||
: public nsTCharSeparatedTokenizer<nsSubstring,
|
||||
nsDependentSubstring,
|
||||
IsWhitespace>
|
||||
: public nsTCharSeparatedTokenizer<nsDependentSubstring, IsWhitespace>
|
||||
{
|
||||
public:
|
||||
nsCharSeparatedTokenizerTemplate(const nsSubstring& aSource,
|
||||
char16_t aSeparatorChar,
|
||||
uint32_t aFlags = 0)
|
||||
: nsTCharSeparatedTokenizer<nsSubstring,
|
||||
nsDependentSubstring,
|
||||
: nsTCharSeparatedTokenizer<nsDependentSubstring,
|
||||
IsWhitespace>(aSource, aSeparatorChar, aFlags)
|
||||
{
|
||||
}
|
||||
@ -195,16 +191,13 @@ public:
|
||||
|
||||
template<bool IsWhitespace(char16_t) = NS_IsAsciiWhitespace>
|
||||
class nsCCharSeparatedTokenizerTemplate
|
||||
: public nsTCharSeparatedTokenizer<nsCSubstring,
|
||||
nsDependentCSubstring,
|
||||
IsWhitespace>
|
||||
: public nsTCharSeparatedTokenizer<nsDependentCSubstring, IsWhitespace>
|
||||
{
|
||||
public:
|
||||
nsCCharSeparatedTokenizerTemplate(const nsCSubstring& aSource,
|
||||
char aSeparatorChar,
|
||||
uint32_t aFlags = 0)
|
||||
: nsTCharSeparatedTokenizer<nsCSubstring,
|
||||
nsDependentCSubstring,
|
||||
: nsTCharSeparatedTokenizer<nsDependentCSubstring,
|
||||
IsWhitespace>(aSource, aSeparatorChar, aFlags)
|
||||
{
|
||||
}
|
||||
|
@ -10,12 +10,11 @@
|
||||
#include "nsDependentSubstring.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
template<typename SubstringType,
|
||||
typename DependentSubstringType,
|
||||
bool IsWhitespace(char16_t)>
|
||||
template<typename DependentSubstringType, bool IsWhitespace(char16_t)>
|
||||
class nsTWhitespaceTokenizer
|
||||
{
|
||||
typedef typename SubstringType::char_type CharType;
|
||||
typedef typename DependentSubstringType::char_type CharType;
|
||||
typedef typename DependentSubstringType::substring_type SubstringType;
|
||||
|
||||
public:
|
||||
nsTWhitespaceTokenizer(const SubstringType& aSource)
|
||||
@ -83,13 +82,11 @@ private:
|
||||
|
||||
template<bool IsWhitespace(char16_t) = NS_IsAsciiWhitespace>
|
||||
class nsWhitespaceTokenizerTemplate
|
||||
: public nsTWhitespaceTokenizer<nsSubstring, nsDependentSubstring,
|
||||
IsWhitespace>
|
||||
: public nsTWhitespaceTokenizer<nsDependentSubstring, IsWhitespace>
|
||||
{
|
||||
public:
|
||||
nsWhitespaceTokenizerTemplate(const nsSubstring& aSource)
|
||||
: nsTWhitespaceTokenizer<nsSubstring, nsDependentSubstring,
|
||||
IsWhitespace>(aSource)
|
||||
: nsTWhitespaceTokenizer<nsDependentSubstring, IsWhitespace>(aSource)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -106,13 +103,11 @@ public:
|
||||
|
||||
template<bool IsWhitespace(char16_t) = NS_IsAsciiWhitespace>
|
||||
class nsCWhitespaceTokenizerTemplate
|
||||
: public nsTWhitespaceTokenizer<nsCSubstring, nsDependentCSubstring,
|
||||
IsWhitespace>
|
||||
: public nsTWhitespaceTokenizer<nsDependentCSubstring, IsWhitespace>
|
||||
{
|
||||
public:
|
||||
nsCWhitespaceTokenizerTemplate(const nsCSubstring& aSource)
|
||||
: nsTWhitespaceTokenizer<nsCSubstring, nsDependentCSubstring,
|
||||
IsWhitespace>(aSource)
|
||||
: nsTWhitespaceTokenizer<nsDependentCSubstring, IsWhitespace>(aSource)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user