diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-20 19:46:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-21 07:35:05 +0100 |
commit | b3531d10e86a0e1750180422a664c98f69e38b66 (patch) | |
tree | 5e7d2905be9068cc5e09b3833f889154e356a247 /l10ntools | |
parent | d1ffd54cf4acb8865019f2fceffd1b3682720aa1 (diff) |
loplugin:subtlezeroinit: l10ntools
Change-Id: I7732da89b1e48738b5bc0d5f8045bee0fe079e85
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/lngmerge.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx index 0411e1c6d201..646cd02f044b 100644 --- a/l10ntools/source/lngmerge.cxx +++ b/l10ntools/source/lngmerge.cxx @@ -53,7 +53,7 @@ LngParser::LngParser(const OString &rLngFile) , pLines( nullptr ) , sSource( rLngFile ) { - pLines = new LngLineList(); + pLines = new LngLineList; std::ifstream aStream(sSource.getStr()); if (aStream.is_open()) { diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index b3d8c1d0028a..7281c734eb13 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -86,7 +86,7 @@ XMLParentNode::XMLParentNode( const XMLParentNode& rObj) { if( rObj.m_pChildList ) { - m_pChildList.reset( new XMLChildNodeList() ); + m_pChildList.reset( new XMLChildNodeList ); for ( size_t i = 0; i < rObj.m_pChildList->size(); i++ ) { XMLChildNode* pNode = (*rObj.m_pChildList)[ i ]; @@ -120,7 +120,7 @@ XMLParentNode& XMLParentNode::operator=(const XMLParentNode& rObj) } if( rObj.m_pChildList ) { - m_pChildList.reset( new XMLChildNodeList() ); + m_pChildList.reset( new XMLChildNodeList ); for ( size_t i = 0; i < rObj.m_pChildList->size(); i++ ) AddChild( (*rObj.m_pChildList)[ i ] ); } @@ -133,7 +133,7 @@ XMLParentNode& XMLParentNode::operator=(const XMLParentNode& rObj) void XMLParentNode::AddChild( XMLChildNode *pChild ) { if ( !m_pChildList ) - m_pChildList.reset( new XMLChildNodeList() ); + m_pChildList.reset( new XMLChildNodeList ); m_pChildList->push_back( pChild ); } @@ -326,7 +326,7 @@ XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created void XMLFile::Extract() { - m_pXMLStrings.reset( new XMLHashMap() ); + m_pXMLStrings.reset( new XMLHashMap ); SearchL10NElements( this ); } @@ -364,7 +364,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement ) XMLHashMap::iterator pos = m_pXMLStrings->find( sId ); if( pos == m_pXMLStrings->end() ) // No instance, create new one { - pElem = new LangHashMap(); + pElem = new LangHashMap; (*pElem)[ sLanguage ]=pElement; m_pXMLStrings->insert( XMLHashMap::value_type( sId , pElem ) ); m_vOrder.push_back( sId ); @@ -405,11 +405,11 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj) if( rObj.m_pXMLStrings ) { - m_pXMLStrings.reset( new XMLHashMap() ); + m_pXMLStrings.reset( new XMLHashMap ); for( XMLHashMap::iterator pos = rObj.m_pXMLStrings->begin() ; pos != rObj.m_pXMLStrings->end() ; ++pos ) { LangHashMap* pElem=pos->second; - LangHashMap* pNewelem = new LangHashMap(); + LangHashMap* pNewelem = new LangHashMap; for(LangHashMap::iterator pos2=pElem->begin(); pos2!=pElem->end();++pos2) { (*pNewelem)[ pos2->first ] = new XMLElement( *pos2->second ); @@ -572,7 +572,7 @@ XMLElement::XMLElement(const XMLElement& rObj) { if ( rObj.m_pAttributes ) { - m_pAttributes.reset( new XMLAttributeList() ); + m_pAttributes.reset( new XMLAttributeList ); for ( size_t i = 0; i < rObj.m_pAttributes->size(); i++ ) AddAttribute( (*rObj.m_pAttributes)[ i ]->GetName(), (*rObj.m_pAttributes)[ i ]->GetValue() ); } @@ -597,7 +597,7 @@ XMLElement& XMLElement::operator=(const XMLElement& rObj) } if ( rObj.m_pAttributes ) { - m_pAttributes.reset( new XMLAttributeList() ); + m_pAttributes.reset( new XMLAttributeList ); for ( size_t i = 0; i < rObj.m_pAttributes->size(); i++ ) AddAttribute( (*rObj.m_pAttributes)[ i ]->GetName(), (*rObj.m_pAttributes)[ i ]->GetValue() ); } @@ -608,7 +608,7 @@ XMLElement& XMLElement::operator=(const XMLElement& rObj) void XMLElement::AddAttribute( const OString &rAttribute, const OString &rValue ) { if ( !m_pAttributes ) - m_pAttributes.reset( new XMLAttributeList() ); + m_pAttributes.reset( new XMLAttributeList ); m_pAttributes->push_back( new XMLAttribute( rAttribute, rValue ) ); } |