idlc/inc/idlc.hxx | 2 +- idlc/inc/idlctypes.hxx | 3 --- idlc/inc/options.hxx | 4 ++-- idlc/source/idlcmain.cxx | 4 ++-- idlc/source/idlcproduce.cxx | 8 ++++---- idlc/source/parser.y | 22 +++++++++++----------- 6 files changed, 20 insertions(+), 23 deletions(-)
New commits: commit 4f0f1b6b5554f49dfe8cca1088d3e5b342b4fd2a Author: Asela Dasanayaka <[email protected]> Date: Thu Oct 13 14:42:16 2016 +0530 tdf#96099 Reduce no of typedefs used for trivial containers Removed various pinter typedefs in idlc module Change-Id: Id850558a4550085d47a5e1122b1ce871f15956f2 Reviewed-on: https://gerrit.libreoffice.org/29754 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/idlc/inc/idlc.hxx b/idlc/inc/idlc.hxx index 56fda18..468bec2 100644 --- a/idlc/inc/idlc.hxx +++ b/idlc/inc/idlc.hxx @@ -132,7 +132,7 @@ private: sal_uInt32 m_offsetStart; sal_uInt32 m_offsetEnd; ParseState m_parseState; - StringSet m_includes; + std::set< OString > m_includes; }; diff --git a/idlc/inc/idlctypes.hxx b/idlc/inc/idlctypes.hxx index 12c665c..931afbf 100644 --- a/idlc/inc/idlctypes.hxx +++ b/idlc/inc/idlctypes.hxx @@ -30,9 +30,6 @@ #include <sal/types.h> #include <rtl/ustring.hxx> -typedef ::std::list< OString > StringList; -typedef ::std::vector< OString > StringVector; -typedef ::std::set< OString > StringSet; class AstDeclaration; diff --git a/idlc/inc/options.hxx b/idlc/inc/options.hxx index 3fbfc45..709cfc6 100644 --- a/idlc/inc/options.hxx +++ b/idlc/inc/options.hxx @@ -64,14 +64,14 @@ public: const OString& getOption(const OString& option) throw( IllegalArgument ); - const StringVector& getInputFiles() const { return m_inputFiles; } + const std::vector< OString >& getInputFiles() const { return m_inputFiles; } bool readStdin() const { return m_stdin; } bool verbose() const { return m_verbose; } bool quiet() const { return m_quiet; } protected: OString m_program; - StringVector m_inputFiles; + std::vector< OString > m_inputFiles; bool m_stdin; bool m_verbose; bool m_quiet; diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx index d610246..59a656a 100644 --- a/idlc/source/idlcmain.cxx +++ b/idlc/source/idlcmain.cxx @@ -72,14 +72,14 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) } idlc()->reset(); } - StringVector const & files = options.getInputFiles(); + std::vector< OString > const & files = options.getInputFiles(); if ( options.verbose() ) { fprintf( stdout, "%s: compiling %i source files ... \n", options.getProgramName().getStr(), (int)files.size() ); fflush( stdout ); } - for (StringVector::const_iterator i(files.begin()); + for (std::vector< OString >::const_iterator i(files.begin()); i != files.end() && nErrors == 0; ++i) { OString sysFileName( convertToAbsoluteSystemPath(*i) ); diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx index 1588dd3..32e53db 100644 --- a/idlc/source/idlcproduce.cxx +++ b/idlc/source/idlcproduce.cxx @@ -39,7 +39,7 @@ using namespace ::osl; -StringList* pCreatedDirectories = nullptr; +std::list< OString >* pCreatedDirectories = nullptr; static bool checkOutputPath(const OString& completeName) { @@ -83,7 +83,7 @@ static bool checkOutputPath(const OString& completeName) } else { if ( !pCreatedDirectories ) - pCreatedDirectories = new StringList(); + pCreatedDirectories = new std::list< OString >(); pCreatedDirectories->push_front(buffer.getStr()); } } @@ -96,8 +96,8 @@ static bool cleanPath() { if ( pCreatedDirectories ) { - StringList::iterator iter = pCreatedDirectories->begin(); - StringList::iterator end = pCreatedDirectories->end(); + std::list< OString >::iterator iter = pCreatedDirectories->begin(); + std::list< OString >::iterator end = pCreatedDirectories->end(); while ( iter != end ) { //#ifdef SAL_UNX diff --git a/idlc/source/parser.y b/idlc/source/parser.y index c045916..6e7bf78 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -235,7 +235,7 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) { sal_uInt32 ulval; /* sal_uInt32 value */ double dval; /* double value */ float fval; /* float value */ - StringList* slval; /* StringList value */ + std::list< OString >* slval; /* StringList value */ AttributeExceptions::Part attexcpval; AttributeExceptions attexcval; } @@ -1624,8 +1624,8 @@ service_export : */ if ( pScope && $2 ) { - StringList::iterator iter = $2->begin(); - StringList::iterator end = $2->end(); + std::list< OString >::iterator iter = $2->begin(); + std::list< OString >::iterator end = $2->end(); while ( iter != end ) { @@ -1668,8 +1668,8 @@ service_export : */ if ( pScope && $2 ) { - StringList::iterator iter = $2->begin(); - StringList::iterator end = $2->end(); + std::list< OString >::iterator iter = $2->begin(); + std::list< OString >::iterator end = $2->end(); while ( iter != end ) { @@ -1714,8 +1714,8 @@ service_export : */ if ( pScope && $2 ) { - StringList::iterator iter = $2->begin(); - StringList::iterator end = $2->end(); + std::list< OString >::iterator iter = $2->begin(); + std::list< OString >::iterator end = $2->end(); while ( iter != end ) { @@ -1755,8 +1755,8 @@ service_export : */ if ( pScope && $2 ) { - StringList::iterator iter = $2->begin(); - StringList::iterator end = $2->end(); + std::list< OString >::iterator iter = $2->begin(); + std::list< OString >::iterator end = $2->end(); while ( iter != end ) { @@ -2140,7 +2140,7 @@ at_least_one_scoped_name : $$ = $2; } else { - StringList* pScopedNames = new StringList(); + std::list< OString >* pScopedNames = new std::list< OString >(); // coverity [copy_paste_error] pScopedNames->push_back(*$1); $$ = pScopedNames; @@ -2164,7 +2164,7 @@ scoped_names : $$ = $1; } else { - StringList* pNames = new StringList(); + std::list< OString >* pNames = new std::list< OString >(); pNames->push_back(*$4); $$ = pNames; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
