Commit e4eaf929 authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by Christian Kandeler
Browse files

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: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 66bc3981
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment