summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2018-08-23 22:36:58 +0900
committerMichele Calgaro <[email protected]>2018-08-23 22:37:15 +0900
commitb17b44f717da8be759af43825db9873f65a5c817 (patch)
tree3e4d093b5bf234579854a73b8294c407f8cdfd06
parentff9d42374ef0388ec807f1a7e4d70847e13503a2 (diff)
downloadtdesdk-b17b44f717da8be759af43825db9873f65a5c817.tar.gz
tdesdk-b17b44f717da8be759af43825db9873f65a5c817.zip
Fixed typedef-related warnings from compiler.
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 8dd73fd330cb0d18ec6f24f01ce47641c659fc1b)
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.cpp4
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.h182
2 files changed, 50 insertions, 136 deletions
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
index 8e6922ee..c10e6da6 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
@@ -711,7 +711,7 @@ void DeclaratorAST::addArrayDimension( AST::Node& arrayDimension )
m_arrayDimensionList.append( arrayDimension.release() );
}
-void DeclaratorAST::setParameterDeclarationClause( AUTO_PTR<class ParameterDeclarationClauseAST>& parameterDeclarationClause )
+void DeclaratorAST::setParameterDeclarationClause( std::auto_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause )
{
m_parameterDeclarationClause = parameterDeclarationClause;
if( m_parameterDeclarationClause.get() ) m_parameterDeclarationClause->setParent( this );
@@ -1102,7 +1102,7 @@ void TypeParameterAST::setKind( AST::Node& kind )
if( m_kind.get() ) m_kind->setParent( this );
}
-void TypeParameterAST::setTemplateParameterList( AUTO_PTR<class TemplateParameterListAST>& templateParameterList )
+void TypeParameterAST::setTemplateParameterList( std::auto_ptr<class TemplateParameterListAST>& templateParameterList )
{
m_templateParameterList = templateParameterList;
if( m_templateParameterList.get() ) m_templateParameterList->setParent( this );
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.h b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
index ed6d91b0..103276d5 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
@@ -24,92 +24,6 @@
#include <tqstring.h>
#include <tqptrlist.h>
-#if defined( Q_OS_WIN32 ) || defined( TQ_CC_SUN )
-
-#ifndef _THROW0
-# define _THROW0()
-#endif
-
-template <class _Tp> class AUTO_PTR {
-private:
- _Tp* _M_ptr;
-
-public:
- typedef _Tp element_type;
-
- explicit AUTO_PTR(_Tp* __p = 0) _THROW0() : _M_ptr(__p) {}
-
- template <class _Tp1> AUTO_PTR(AUTO_PTR<_Tp1>& __a) _THROW0()
- : _M_ptr(__a.release()) {}
-
- AUTO_PTR(AUTO_PTR& __a) _THROW0() : _M_ptr(__a.release()) {}
-
-
-
- template <class _Tp1>
- AUTO_PTR& operator=(AUTO_PTR<_Tp1>& __a) _THROW0() {
- if (__a.get() != this->get()) {
- delete _M_ptr;
- _M_ptr = __a.release();
- }
- return *this;
- }
-
- AUTO_PTR& operator=(AUTO_PTR& __a) _THROW0() {
- if (&__a != this) {
- delete _M_ptr;
- _M_ptr = __a.release();
- }
- return *this;
- }
-
- ~AUTO_PTR() _THROW0() { delete _M_ptr; }
-
- _Tp& operator*() const _THROW0() {
- return *_M_ptr;
- }
- _Tp* operator->() const _THROW0() {
- return _M_ptr;
- }
- _Tp* get() const _THROW0() {
- return _M_ptr;
- }
- _Tp* release() _THROW0() {
- _Tp* __tmp = _M_ptr;
- _M_ptr = 0;
- return __tmp;
- }
- void reset(_Tp* __p = 0) _THROW0() {
- delete _M_ptr;
- _M_ptr = __p;
- }
-
- // According to the C++ standard, these conversions are required. Most
- // present-day compilers, however, do not enforce that requirement---and,
- // in fact, most present-day compilers do not support the language
- // features that these conversions rely on.
-
-
-private:
- template<class _Tp1> struct AUTO_PTR_ref {
- _Tp1* _M_ptr;
- AUTO_PTR_ref(_Tp1* __p) : _M_ptr(__p) {}
- };
-
-public:
- AUTO_PTR(AUTO_PTR_ref<_Tp> __ref) _THROW0()
- : _M_ptr(__ref._M_ptr) {}
- template <class _Tp1> operator AUTO_PTR_ref<_Tp1>() _THROW0()
- { return AUTO_PTR_ref<_Tp>(this->release()); }
- template <class _Tp1> operator AUTO_PTR<_Tp1>() _THROW0()
- { return AUTO_PTR<_Tp1>(this->release()) }
-
-};
-
-#else
-#define AUTO_PTR std::auto_ptr
-#endif
-
template <class T> typename T::Node CreateNode()
{
typename T::Node node( new T );
@@ -210,7 +124,7 @@ struct Slice
class AST
{
public:
- typedef AUTO_PTR<AST> Node;
+ typedef std::auto_ptr<AST> Node;
enum { Type=NodeType_Generic };
DECLARE_ALLOC( AST )
@@ -278,7 +192,7 @@ private:
class GroupAST: public AST
{
public:
- typedef AUTO_PTR<GroupAST> Node;
+ typedef std::auto_ptr<GroupAST> Node;
enum { Type = NodeType_Group };
DECLARE_ALLOC( GroupAST )
@@ -303,7 +217,7 @@ private:
class TemplateArgumentListAST: public AST
{
public:
- typedef AUTO_PTR<TemplateArgumentListAST> Node;
+ typedef std::auto_ptr<TemplateArgumentListAST> Node;
enum { Type = NodeType_TemplateArgumentList };
DECLARE_ALLOC( TemplateArgumentListAST )
@@ -327,7 +241,7 @@ private:
class ClassOrNamespaceNameAST: public AST
{
public:
- typedef AUTO_PTR<ClassOrNamespaceNameAST> Node;
+ typedef std::auto_ptr<ClassOrNamespaceNameAST> Node;
enum { Type = NodeType_ClassOrNamespaceName };
DECLARE_ALLOC( ClassOrNamespaceNameAST )
@@ -355,7 +269,7 @@ private:
class NameAST: public AST
{
public:
- typedef AUTO_PTR<NameAST> Node;
+ typedef std::auto_ptr<NameAST> Node;
enum { Type = NodeType_Name };
DECLARE_ALLOC( NameAST )
@@ -387,7 +301,7 @@ private:
class TypeParameterAST: public AST
{
public:
- typedef AUTO_PTR<TypeParameterAST> Node;
+ typedef std::auto_ptr<TypeParameterAST> Node;
enum { Type = NodeType_TypeParameter };
DECLARE_ALLOC( TypeParameterAST )
@@ -399,7 +313,7 @@ public:
void setKind( AST::Node& kind );
class TemplateParameterListAST* templateParameterList() { return m_templateParameterList.get(); }
- void setTemplateParameterList( AUTO_PTR<class TemplateParameterListAST>& templateParameterList );
+ void setTemplateParameterList( std::auto_ptr<class TemplateParameterListAST>& templateParameterList );
NameAST* name() { return m_name.get(); }
void setName( NameAST::Node& name );
@@ -409,7 +323,7 @@ public:
private:
AST::Node m_kind;
- AUTO_PTR<class TemplateParameterListAST> m_templateParameterList;
+ std::auto_ptr<class TemplateParameterListAST> m_templateParameterList;
NameAST::Node m_name;
AST::Node m_typeId;
@@ -421,7 +335,7 @@ private:
class DeclarationAST: public AST
{
public:
- typedef AUTO_PTR<DeclarationAST> Node;
+ typedef std::auto_ptr<DeclarationAST> Node;
enum { Type = NodeType_Declaration };
DECLARE_ALLOC( DeclarationAST )
@@ -437,7 +351,7 @@ private:
class AccessDeclarationAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<AccessDeclarationAST> Node;
+ typedef std::auto_ptr<AccessDeclarationAST> Node;
enum { Type = NodeType_AccessDeclaration };
DECLARE_ALLOC( AccessDeclarationAST )
@@ -461,7 +375,7 @@ private:
class TypeSpecifierAST: public AST
{
public:
- typedef AUTO_PTR<TypeSpecifierAST> Node;
+ typedef std::auto_ptr<TypeSpecifierAST> Node;
enum { Type = NodeType_TypeSpecifier };
DECLARE_ALLOC( TypeSpecifierAST )
@@ -493,7 +407,7 @@ private:
class BaseSpecifierAST: public AST
{
public:
- typedef AUTO_PTR<BaseSpecifierAST> Node;
+ typedef std::auto_ptr<BaseSpecifierAST> Node;
enum { Type = NodeType_BaseSpecifier };
DECLARE_ALLOC( BaseSpecifierAST )
@@ -523,7 +437,7 @@ private:
class BaseClauseAST: public AST
{
public:
- typedef AUTO_PTR<BaseClauseAST> Node;
+ typedef std::auto_ptr<BaseClauseAST> Node;
enum { Type = NodeType_BaseClause };
DECLARE_ALLOC( BaseClauseAST )
@@ -545,7 +459,7 @@ private:
class ClassSpecifierAST: public TypeSpecifierAST
{
public:
- typedef AUTO_PTR<ClassSpecifierAST> Node;
+ typedef std::auto_ptr<ClassSpecifierAST> Node;
enum { Type = NodeType_ClassSpecifier };
DECLARE_ALLOC( ClassSpecifierAST )
@@ -579,7 +493,7 @@ private:
class EnumeratorAST: public AST
{
public:
- typedef AUTO_PTR<EnumeratorAST> Node;
+ typedef std::auto_ptr<EnumeratorAST> Node;
enum { Type = NodeType_Enumerator };
DECLARE_ALLOC( EnumeratorAST )
@@ -605,7 +519,7 @@ private:
class EnumSpecifierAST: public TypeSpecifierAST
{
public:
- typedef AUTO_PTR<EnumSpecifierAST> Node;
+ typedef std::auto_ptr<EnumSpecifierAST> Node;
enum { Type = NodeType_EnumSpecifier };
DECLARE_ALLOC( EnumSpecifierAST )
@@ -627,7 +541,7 @@ private:
class ElaboratedTypeSpecifierAST: public TypeSpecifierAST
{
public:
- typedef AUTO_PTR<ElaboratedTypeSpecifierAST> Node;
+ typedef std::auto_ptr<ElaboratedTypeSpecifierAST> Node;
enum { Type = NodeType_ElaboratedTypeSpecifier };
DECLARE_ALLOC( ElaboratedTypeSpecifierAST )
@@ -652,7 +566,7 @@ private:
class LinkageBodyAST: public AST
{
public:
- typedef AUTO_PTR<LinkageBodyAST> Node;
+ typedef std::auto_ptr<LinkageBodyAST> Node;
enum { Type = NodeType_LinkageBody };
DECLARE_ALLOC( LinkageBodyAST )
@@ -674,7 +588,7 @@ private:
class LinkageSpecificationAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<LinkageSpecificationAST> Node;
+ typedef std::auto_ptr<LinkageSpecificationAST> Node;
enum { Type = NodeType_LinkageSpecification };
DECLARE_ALLOC( LinkageSpecificationAST )
@@ -704,7 +618,7 @@ private:
class NamespaceAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<NamespaceAST> Node;
+ typedef std::auto_ptr<NamespaceAST> Node;
enum { Type = NodeType_Namespace };
DECLARE_ALLOC( NamespaceAST )
@@ -730,7 +644,7 @@ private:
class NamespaceAliasAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<NamespaceAliasAST> Node;
+ typedef std::auto_ptr<NamespaceAliasAST> Node;
enum { Type = NodeType_NamespaceAlias };
DECLARE_ALLOC( NamespaceAliasAST )
@@ -756,7 +670,7 @@ private:
class UsingAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<UsingAST> Node;
+ typedef std::auto_ptr<UsingAST> Node;
enum { Type = NodeType_Using };
DECLARE_ALLOC( UsingAST )
@@ -782,7 +696,7 @@ private:
class UsingDirectiveAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<UsingDirectiveAST> Node;
+ typedef std::auto_ptr<UsingDirectiveAST> Node;
enum { Type = NodeType_UsingDirective };
DECLARE_ALLOC( UsingDirectiveAST )
@@ -804,7 +718,7 @@ private:
class DeclaratorAST: public AST
{
public:
- typedef AUTO_PTR<DeclaratorAST> Node;
+ typedef std::auto_ptr<DeclaratorAST> Node;
enum { Type = NodeType_Declarator };
DECLARE_ALLOC( DeclaratorAST )
@@ -828,7 +742,7 @@ public:
void addArrayDimension( AST::Node& arrayDimension );
class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); }
- void setParameterDeclarationClause( AUTO_PTR<class ParameterDeclarationClauseAST>& parameterDeclarationClause );
+ void setParameterDeclarationClause( std::auto_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause );
// ### replace 'constant' with cvQualify
AST* constant() { return m_constant.get(); }
@@ -843,7 +757,7 @@ private:
NameAST::Node m_declaratorId;
AST::Node m_bitfieldInitialization;
TQPtrList<AST> m_arrayDimensionList;
- AUTO_PTR<class ParameterDeclarationClauseAST> m_parameterDeclarationClause;
+ std::auto_ptr<class ParameterDeclarationClauseAST> m_parameterDeclarationClause;
AST::Node m_constant;
GroupAST::Node m_exceptionSpecification;
@@ -855,7 +769,7 @@ private:
class ParameterDeclarationAST: public AST
{
public:
- typedef AUTO_PTR<ParameterDeclarationAST> Node;
+ typedef std::auto_ptr<ParameterDeclarationAST> Node;
enum { Type = NodeType_ParameterDeclaration };
DECLARE_ALLOC( ParameterDeclarationAST )
@@ -887,7 +801,7 @@ private:
class ParameterDeclarationListAST: public AST
{
public:
- typedef AUTO_PTR<ParameterDeclarationListAST> Node;
+ typedef std::auto_ptr<ParameterDeclarationListAST> Node;
enum { Type = NodeType_ParameterDeclarationList };
DECLARE_ALLOC( ParameterDeclarationListAST )
@@ -911,7 +825,7 @@ private:
class ParameterDeclarationClauseAST: public AST
{
public:
- typedef AUTO_PTR<ParameterDeclarationClauseAST> Node;
+ typedef std::auto_ptr<ParameterDeclarationClauseAST> Node;
enum { Type = NodeType_ParameterDeclarationClause };
DECLARE_ALLOC( ParameterDeclarationClauseAST )
@@ -940,7 +854,7 @@ private:
class InitDeclaratorAST: public AST
{
public:
- typedef AUTO_PTR<InitDeclaratorAST> Node;
+ typedef std::auto_ptr<InitDeclaratorAST> Node;
enum { Type = NodeType_InitDeclarator };
DECLARE_ALLOC( InitDeclaratorAST )
@@ -966,7 +880,7 @@ private:
class InitDeclaratorListAST: public AST
{
public:
- typedef AUTO_PTR<InitDeclaratorListAST> Node;
+ typedef std::auto_ptr<InitDeclaratorListAST> Node;
enum { Type = NodeType_InitDeclaratorList };
DECLARE_ALLOC( InitDeclaratorListAST )
@@ -988,7 +902,7 @@ private:
class TypedefAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<TypedefAST> Node;
+ typedef std::auto_ptr<TypedefAST> Node;
enum { Type = NodeType_Typedef };
DECLARE_ALLOC( TypedefAST )
@@ -1014,7 +928,7 @@ private:
class TemplateParameterAST: public AST
{
public:
- typedef AUTO_PTR<TemplateParameterAST> Node;
+ typedef std::auto_ptr<TemplateParameterAST> Node;
enum { Type = NodeType_TemplateParameter };
DECLARE_ALLOC( TemplateParameterAST )
@@ -1040,7 +954,7 @@ private:
class TemplateParameterListAST: public AST
{
public:
- typedef AUTO_PTR<TemplateParameterListAST> Node;
+ typedef std::auto_ptr<TemplateParameterListAST> Node;
enum { Type = NodeType_TemplateParameterList };
DECLARE_ALLOC( TemplateParameterListAST )
@@ -1062,7 +976,7 @@ private:
class TemplateDeclarationAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<TemplateDeclarationAST> Node;
+ typedef std::auto_ptr<TemplateDeclarationAST> Node;
enum { Type = NodeType_TemplateDeclaration };
DECLARE_ALLOC( TemplateDeclarationAST )
@@ -1092,7 +1006,7 @@ private:
class SimpleDeclarationAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<SimpleDeclarationAST> Node;
+ typedef std::auto_ptr<SimpleDeclarationAST> Node;
enum { Type = NodeType_SimpleDeclaration };
DECLARE_ALLOC( SimpleDeclarationAST )
@@ -1130,7 +1044,7 @@ private:
class StatementAST: public AST
{
public:
- typedef AUTO_PTR<StatementAST> Node;
+ typedef std::auto_ptr<StatementAST> Node;
enum { Type = NodeType_Statement };
DECLARE_ALLOC( StatementAST )
@@ -1146,7 +1060,7 @@ private:
class ExpressionStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<ExpressionStatementAST> Node;
+ typedef std::auto_ptr<ExpressionStatementAST> Node;
enum { Type = NodeType_ExpressionStatement };
DECLARE_ALLOC( ExpressionStatementAST )
@@ -1168,7 +1082,7 @@ private:
class ConditionAST: public AST
{
public:
- typedef AUTO_PTR<ConditionAST> Node;
+ typedef std::auto_ptr<ConditionAST> Node;
enum { Type = NodeType_Condition };
DECLARE_ALLOC( ConditionAST )
@@ -1198,7 +1112,7 @@ private:
class IfStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<IfStatementAST> Node;
+ typedef std::auto_ptr<IfStatementAST> Node;
enum { Type = NodeType_IfStatement };
DECLARE_ALLOC( IfStatementAST )
@@ -1228,7 +1142,7 @@ private:
class WhileStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<WhileStatementAST> Node;
+ typedef std::auto_ptr<WhileStatementAST> Node;
enum { Type = NodeType_WhileStatement };
DECLARE_ALLOC( WhileStatementAST )
@@ -1254,7 +1168,7 @@ private:
class DoStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<DoStatementAST> Node;
+ typedef std::auto_ptr<DoStatementAST> Node;
enum { Type = NodeType_DoStatement };
DECLARE_ALLOC( DoStatementAST )
@@ -1280,7 +1194,7 @@ private:
class ForStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<ForStatementAST> Node;
+ typedef std::auto_ptr<ForStatementAST> Node;
enum { Type = NodeType_ForStatement };
DECLARE_ALLOC( ForStatementAST )
@@ -1314,7 +1228,7 @@ private:
class SwitchStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<SwitchStatementAST> Node;
+ typedef std::auto_ptr<SwitchStatementAST> Node;
enum { Type = NodeType_SwitchStatement };
DECLARE_ALLOC( SwitchStatementAST )
@@ -1340,7 +1254,7 @@ private:
class StatementListAST: public StatementAST
{
public:
- typedef AUTO_PTR<StatementListAST> Node;
+ typedef std::auto_ptr<StatementListAST> Node;
enum { Type = NodeType_StatementList };
DECLARE_ALLOC( StatementListAST )
@@ -1362,7 +1276,7 @@ private:
class DeclarationStatementAST: public StatementAST
{
public:
- typedef AUTO_PTR<DeclarationStatementAST> Node;
+ typedef std::auto_ptr<DeclarationStatementAST> Node;
enum { Type = NodeType_DeclarationStatement };
DECLARE_ALLOC( DeclarationStatementAST )
@@ -1384,7 +1298,7 @@ private:
class FunctionDefinitionAST: public DeclarationAST
{
public:
- typedef AUTO_PTR<FunctionDefinitionAST> Node;
+ typedef std::auto_ptr<FunctionDefinitionAST> Node;
enum { Type = NodeType_FunctionDefinition };
DECLARE_ALLOC( FunctionDefinitionAST )
@@ -1427,7 +1341,7 @@ private:
class TranslationUnitAST: public AST
{
public:
- typedef AUTO_PTR<TranslationUnitAST> Node;
+ typedef std::auto_ptr<TranslationUnitAST> Node;
enum { Type = NodeType_TranslationUnit };
DECLARE_ALLOC( TranslationUnitAST )