summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-12-02 15:56:35 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-12-02 18:34:22 +0100
commit0fe6d567be1a58a466b07e8c3732f0cbcc436443 (patch)
treeee5bffa6735eec1b8fc914a66b21ed10b437d406 /dbaccess
parentd05351723055dd56e8732c4ac2104cd8111e2a54 (diff)
janitorial: simplify code, no behaviour change
operator[] on a map implicitly adds an entry and default-initializes value part Change-Id: Iab7817fb7fef5e9a6afdeb74be0d523fde59b5c1
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index cf4fc38d123e..dfc0114d5ea5 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1028,14 +1028,8 @@ namespace
for(;aIter != aEnd;++aIter)
{
static_cast<OQueryTableConnection*>(*aIter)->SetVisited(sal_False);
- if ( aConnectionCount.find((*aIter)->GetSourceWin()) == aConnectionCount.end() )
- aConnectionCount.insert(::std::map<OTableWindow*,sal_Int32>::value_type((*aIter)->GetSourceWin(),0));
- else
- aConnectionCount[(*aIter)->GetSourceWin()]++;
- if ( aConnectionCount.find((*aIter)->GetDestWin()) == aConnectionCount.end() )
- aConnectionCount.insert(::std::map<OTableWindow*,sal_Int32>::value_type((*aIter)->GetDestWin(),0));
- else
- aConnectionCount[(*aIter)->GetDestWin()]++;
+ aConnectionCount[(*aIter)->GetSourceWin()]++;
+ aConnectionCount[(*aIter)->GetDestWin()]++;
}
::std::multimap<sal_Int32 , OTableWindow*> aMulti;
::std::map<OTableWindow*,sal_Int32>::iterator aCountIter = aConnectionCount.begin();