summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsela Dasanayaka <rukmal.tb@gmail.com>2016-10-13 14:42:16 +0530
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-13 10:15:52 +0000
commit4f0f1b6b5554f49dfe8cca1088d3e5b342b4fd2a (patch)
tree660a1dd2ea9d4b26a83fde63c71ec04f15e38b4b
parentc236c8e88a6d3e30cc4acc9108cbce018ca872cc (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--idlc/inc/idlc.hxx2
-rw-r--r--idlc/inc/idlctypes.hxx3
-rw-r--r--idlc/inc/options.hxx4
-rw-r--r--idlc/source/idlcmain.cxx4
-rw-r--r--idlc/source/idlcproduce.cxx8
-rw-r--r--idlc/source/parser.y22
6 files changed, 20 insertions, 23 deletions
diff --git a/idlc/inc/idlc.hxx b/idlc/inc/idlc.hxx
index 56fda18c9386..468bec2ba26f 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 12c665cc0ef9..931afbfb5c3d 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 3fbfc4586d1f..709cfc6b6614 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 d610246dcc46..59a656aed142 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 1588dd312154..32e53dbce537 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 c0459163ed80..6e7bf785154f 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;
}