Bug 1035884 - Follow-up: Remove SubstringType template argument for ns{CharSeparated,Whitespace}Tokenizer. r=froydnj

This commit is contained in:
Birunthan Mohanathas 2014-07-27 08:52:52 -07:00
Родитель 25b496a4b2
Коммит 77bec57910
2 изменённых файлов: 14 добавлений и 26 удалений

Просмотреть файл

@ -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)
{
}
};