Kaydet (Commit) 66c11b52 authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

üst 147824a9
...@@ -526,7 +526,6 @@ void __EXPORT TestWindow::Resize() ...@@ -526,7 +526,6 @@ void __EXPORT TestWindow::Resize()
void __EXPORT TestWindow::KeyInput( const KeyEvent& rKEvt ) void __EXPORT TestWindow::KeyInput( const KeyEvent& rKEvt )
{ {
char nCharCode = rKEvt.GetCharCode();
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
// Nur bei Alt-Return // Nur bei Alt-Return
......
...@@ -1381,7 +1381,7 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG) ...@@ -1381,7 +1381,7 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG)
//If users are going to update a shared extension then we need //If users are going to update a shared extension then we need
//to warn them //to warn them
typedef ::std::vector<UpdateData>::const_iterator CIT; typedef ::std::vector<UpdateData>::const_iterator CIT;
for (CIT i = m_enabledUpdates.begin(); i < m_enabledUpdates.end(); i++) for (CIT i = m_enabledUpdates.begin(); i < m_enabledUpdates.end(); ++i)
{ {
OSL_ASSERT(i->aInstalledPackage.is()); OSL_ASSERT(i->aInstalledPackage.is());
//If the user has no write access to the shared folder then the update //If the user has no write access to the shared folder then the update
......
...@@ -102,7 +102,7 @@ OUString CompIdentifiers::getName(::std::vector<Reference<deploy::XPackage> > co ...@@ -102,7 +102,7 @@ OUString CompIdentifiers::getName(::std::vector<Reference<deploy::XPackage> > co
//get the first non-null reference //get the first non-null reference
Reference<deploy::XPackage> extension; Reference<deploy::XPackage> extension;
::std::vector<Reference<deploy::XPackage> >::const_iterator it = a.begin(); ::std::vector<Reference<deploy::XPackage> >::const_iterator it = a.begin();
for (; it != a.end(); it++) for (; it != a.end(); ++it)
{ {
if (it->is()) if (it->is())
{ {
...@@ -250,13 +250,13 @@ void ExtensionManager::addExtensionsToMap( ...@@ -250,13 +250,13 @@ void ExtensionManager::addExtensionsToMap(
::std::list<OUString>::const_iterator citNames = ::std::list<OUString>::const_iterator citNames =
m_repositoryNames.begin(); m_repositoryNames.begin();
int index = 0; int index = 0;
for (;citNames != m_repositoryNames.end(); citNames++, index++) for (;citNames != m_repositoryNames.end(); ++citNames, ++index)
{ {
if (citNames->equals(repository)) if (citNames->equals(repository))
break; break;
} }
for (int i = 0; i < seqExt.getLength(); i++) for (int i = 0; i < seqExt.getLength(); ++i)
{ {
Reference<deploy::XPackage> const & xExtension = seqExt[i]; Reference<deploy::XPackage> const & xExtension = seqExt[i];
OUString id = dp_misc::getIdentifier(xExtension); OUString id = dp_misc::getIdentifier(xExtension);
...@@ -333,7 +333,7 @@ ExtensionManager::getExtensionsWithSameIdentifier( ...@@ -333,7 +333,7 @@ ExtensionManager::getExtensionsWithSameIdentifier(
//throw an IllegalArgumentException if there is no extension at all. //throw an IllegalArgumentException if there is no extension at all.
typedef ::std::list<Reference<deploy::XPackage> >::const_iterator CIT; typedef ::std::list<Reference<deploy::XPackage> >::const_iterator CIT;
for (CIT i = listExtensions.begin(); i != listExtensions.end(); i++) for (CIT i = listExtensions.begin(); i != listExtensions.end(); ++i)
bHasExtension |= i->is(); bHasExtension |= i->is();
if (!bHasExtension) if (!bHasExtension)
throw lang::IllegalArgumentException( throw lang::IllegalArgumentException(
......
...@@ -429,7 +429,7 @@ void BackendDb::writeSimpleList( ...@@ -429,7 +429,7 @@ void BackendDb::writeSimpleList(
listNode, css::uno::UNO_QUERY_THROW)); listNode, css::uno::UNO_QUERY_THROW));
typedef ::std::list<OUString>::const_iterator ITC_ITEMS; typedef ::std::list<OUString>::const_iterator ITC_ITEMS;
for (ITC_ITEMS i = list.begin(); i != list.end(); i++) for (ITC_ITEMS i = list.begin(); i != list.end(); ++i)
{ {
const Reference<css::xml::dom::XNode> memberNode( const Reference<css::xml::dom::XNode> memberNode(
doc->createElementNS(sNameSpace, sPrefix + sMemberTagName), css::uno::UNO_QUERY_THROW); doc->createElementNS(sNameSpace, sPrefix + sMemberTagName), css::uno::UNO_QUERY_THROW);
......
...@@ -355,7 +355,7 @@ void printf_packages( ...@@ -355,7 +355,7 @@ void printf_packages(
{ {
typedef ::std::vector< Reference<deployment::XPackage> >::const_iterator I_EXT; typedef ::std::vector< Reference<deployment::XPackage> >::const_iterator I_EXT;
int index = 0; int index = 0;
for (I_EXT i = allExtensions.begin(); i != allExtensions.end(); i++, index++) for (I_EXT i = allExtensions.begin(); i != allExtensions.end(); ++i, ++index)
{ {
if (vecUnaccepted[index]) if (vecUnaccepted[index])
printf_unaccepted_licenses(*i); printf_unaccepted_licenses(*i);
......
...@@ -365,7 +365,7 @@ namespace ...@@ -365,7 +365,7 @@ namespace
~PropertyHolders() ~PropertyHolders()
{ {
while(maPropertyHolders.size()) while(!maPropertyHolders.empty())
{ {
delete maPropertyHolders.back(); delete maPropertyHolders.back();
maPropertyHolders.pop_back(); maPropertyHolders.pop_back();
...@@ -527,7 +527,7 @@ namespace ...@@ -527,7 +527,7 @@ namespace
void Pop() void Pop()
{ {
OSL_ENSURE(maTargetHolders.size(), "TargetHolders: POP with no property holders (!)"); OSL_ENSURE(maTargetHolders.size(), "TargetHolders: POP with no property holders (!)");
if(maTargetHolders.size()) if(!maTargetHolders.empty())
{ {
delete maTargetHolders.back(); delete maTargetHolders.back();
maTargetHolders.pop_back(); maTargetHolders.pop_back();
...@@ -542,7 +542,7 @@ namespace ...@@ -542,7 +542,7 @@ namespace
~TargetHolders() ~TargetHolders()
{ {
while(maTargetHolders.size()) while(!maTargetHolders.empty())
{ {
delete maTargetHolders.back(); delete maTargetHolders.back();
maTargetHolders.pop_back(); maTargetHolders.pop_back();
...@@ -632,7 +632,7 @@ namespace ...@@ -632,7 +632,7 @@ namespace
PropertyHolder& rProperties, PropertyHolder& rProperties,
basegfx::BColor aBColor) basegfx::BColor aBColor)
{ {
if(rPositions.size()) if(!rPositions.empty())
{ {
if(rProperties.getTransformation().isIdentity()) if(rProperties.getTransformation().isIdentity())
{ {
...@@ -1589,7 +1589,7 @@ namespace ...@@ -1589,7 +1589,7 @@ namespace
} }
} }
if(aTargetVector.size()) if(!aTargetVector.empty())
{ {
// add created text primitive to target // add created text primitive to target
if(rProperty.getTransformation().isIdentity()) if(rProperty.getTransformation().isIdentity())
...@@ -1687,7 +1687,7 @@ namespace ...@@ -1687,7 +1687,7 @@ namespace
if(pA->GetColor() != aLastColor) if(pA->GetColor() != aLastColor)
{ {
if(aPositions.size()) if(!aPositions.empty())
{ {
createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor()); createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
aPositions.clear(); aPositions.clear();
...@@ -1703,7 +1703,7 @@ namespace ...@@ -1703,7 +1703,7 @@ namespace
nAction--; nAction--;
if(aPositions.size()) if(!aPositions.empty())
{ {
createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor()); createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor());
} }
...@@ -1727,7 +1727,7 @@ namespace ...@@ -1727,7 +1727,7 @@ namespace
nAction--; nAction--;
if(aPositions.size()) if(!aPositions.empty())
{ {
createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), rPropertyHolders.Current().getLineColor()); createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), rPropertyHolders.Current().getLineColor());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment