forked from qt-creator/qt-creator
namedemangler: move template implementation to the .h file
NonNegativeNumberNode<base>::mangledRepresentationStartsWith is used by the tests, so moving that implementation to the .h file Change-Id: I42267030dcbd9d128d5cc165a8d688a68354eb90 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
committed by
Christian Kandeler
parent
66bc398183
commit
e4eaf929dc
@@ -230,7 +230,7 @@ BuiltinTypeNode::BuiltinTypeNode(const BuiltinTypeNode &other)
|
||||
|
||||
bool BuiltinTypeNode::mangledRepresentationStartsWith(char c)
|
||||
{
|
||||
return strchr("vwbcahstijlmxynofgedzDu", c);
|
||||
return std::strchr("vwbcahstijlmxynofgedzDu", c);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2103,15 +2103,6 @@ template<int base> NonNegativeNumberNode<base>::NonNegativeNumberNode(const NonN
|
||||
{
|
||||
}
|
||||
|
||||
template<int base> bool NonNegativeNumberNode<base>::mangledRepresentationStartsWith(char c)
|
||||
{
|
||||
// Base can only be 10 or 36.
|
||||
if (base == 10)
|
||||
return strchr("0123456789", c);
|
||||
else
|
||||
return strchr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", c);
|
||||
}
|
||||
|
||||
template<int base> void NonNegativeNumberNode<base>::parse()
|
||||
{
|
||||
QByteArray numberRepr;
|
||||
|
@@ -552,7 +552,10 @@ template<int base> class NonNegativeNumberNode : public ParseTreeNode
|
||||
public:
|
||||
typedef QSharedPointer<NonNegativeNumberNode<base> > Ptr;
|
||||
NonNegativeNumberNode(GlobalParseState *parseState) : ParseTreeNode(parseState) {}
|
||||
static bool mangledRepresentationStartsWith(char c);
|
||||
static bool mangledRepresentationStartsWith(char c) {
|
||||
// Base can only be 10 or 36.
|
||||
return (c >= '0' && c <= '9') || (base == 36 && c >= 'A' && c <= 'Z');
|
||||
}
|
||||
quint64 number() const { return m_number; }
|
||||
QByteArray toByteArray() const;
|
||||
|
||||
|
Reference in New Issue
Block a user