[Libreoffice-commits] core.git: idlc/inc idlc/source

Stephan Bergmann sbergman at redhat.com
Mon Nov 30 05:56:05 PST 2015


 idlc/inc/idlc/fehelper.hxx |   13 ++-----------
 idlc/source/fehelper.cxx   |   14 +++-----------
 idlc/source/parser.y       |   12 ++++++------
 3 files changed, 11 insertions(+), 28 deletions(-)

New commits:
commit 0555447cd09fa2851e51cd63543ebc7db0a72a1a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Nov 30 14:53:59 2015 +0100

    FD_complex is unused
    
    ...since 8e71d9400bd350d63723c5489ddaadb3d3610baf "Remove UNOIDL 'array' and
    'union' vaporware from idlc"
    
    Change-Id: Id4cdef900667cdac466a41e47c189e2d25a62065

diff --git a/idlc/inc/idlc/fehelper.hxx b/idlc/inc/idlc/fehelper.hxx
index 6256648..1af6456 100644
--- a/idlc/inc/idlc/fehelper.hxx
+++ b/idlc/inc/idlc/fehelper.hxx
@@ -27,23 +27,14 @@
 class FeDeclarator
 {
 public:
-    // Enum to denote types of declarators
-    enum DeclaratorType
-    {
-        FD_simple,      // Simple declarator
-        FD_complex      // Complex declarator (complex_part field used)
-    };
-
-    FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart);
+    FeDeclarator(const OString& name);
     virtual ~FeDeclarator();
     const OString& getName()
         { return m_name; }
     bool checkType(AstDeclaration const * pType);
-    AstType const * compose(AstDeclaration const * pDecl);
+    static AstType const * compose(AstDeclaration const * pDecl);
 private:
-    AstDeclaration* m_pComplexPart;
     OString  m_name;
-    DeclaratorType  m_declType;
 };
 
 typedef ::std::list< FeDeclarator* > FeDeclList;
diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx
index 4e4c549..704c953 100644
--- a/idlc/source/fehelper.cxx
+++ b/idlc/source/fehelper.cxx
@@ -21,10 +21,8 @@
 #include <idlc/errorhandler.hxx>
 #include "idlc/idlc.hxx"
 
-FeDeclarator::FeDeclarator(const OString& name, DeclaratorType declType, AstDeclaration* pComplPart)
-    : m_pComplexPart(pComplPart)
-    , m_name(name)
-    , m_declType(declType)
+FeDeclarator::FeDeclarator(const OString& name)
+    : m_name(name)
 {
 }
 
@@ -47,8 +45,6 @@ bool FeDeclarator::checkType(AstDeclaration const * type)
 
 AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
 {
-    const AstType*    pType;
-
     if ( pDecl == nullptr )
     {
         return nullptr;
@@ -58,11 +54,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
         ErrorHandler::noTypeError(pDecl);
         return nullptr;
     }
-    pType = static_cast<const AstType*>(pDecl);
-    if (m_declType == FD_simple || m_pComplexPart == nullptr)
-        return pType;
-
-    return nullptr; // return through this statement should not happen
+    return static_cast<const AstType*>(pDecl);
 }
 
 FeInheritanceHeader::FeInheritanceHeader(
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index c449aa7..8296ac4 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -733,7 +733,7 @@ attribute :
         AstInterface * scope = static_cast< AstInterface * >(
             idlc()->scopes()->top());
         AstAttribute * attr = new AstAttribute(
-            $1, $4->compose($2), $4->getName(), scope);
+            $1, FeDeclarator::compose($2), $4->getName(), scope);
         delete $4;
         AstInterface::DoubleMemberDeclarations doubleMembers(
             scope->checkMemberClashes(attr));
@@ -1053,7 +1053,7 @@ parameter :
          */
         if ( pScope && $5 && $8 )
         {
-            AstType const * pType = $8->compose($5);
+            AstType const * pType = FeDeclarator::compose($5);
             if ( pType )
             {
                 if (pScope->isConstructor() && $2 != DIR_IN) {
@@ -1570,7 +1570,7 @@ property :
                         continue;
                     }
 
-                    pType = pDecl->compose($2);
+                    pType = FeDeclarator::compose($2);
 
                     if ( !pType )
                     {
@@ -2047,7 +2047,7 @@ type_declarator :
                     continue;
                 }
 
-                pType = pDecl->compose($1);
+                pType = FeDeclarator::compose($1);
 
                 if ( !pType )
                 {
@@ -2122,7 +2122,7 @@ declarator :
             checkIdentifier($1);
         }
 
-        $$ = new FeDeclarator(*$1, FeDeclarator::FD_simple, NULL);
+        $$ = new FeDeclarator(*$1);
         delete $1;
     }
     ;
@@ -2556,7 +2556,7 @@ member :
                     continue;
                 }
 
-                pType = pDecl->compose($1);
+                pType = FeDeclarator::compose($1);
 
                 if ( !pType )
                 {


More information about the Libreoffice-commits mailing list