summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-12 16:18:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-12 16:18:37 +0000
commit20d6bd273c43a9b8573fa077f6d9d631bd2d53cc (patch)
tree7e2c69aeb8669caf66076cb423ce1654d8c15091 /vcl
parent26c0c9d404a65d5ab7a5a9c227132594e467cef4 (diff)
pair::second is false if element with same key already existed
The pair::second element in the pair is set to true if a new element was inserted or false if an element with the same value existed
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/accel.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index e755d486eefb..50afd2b0f1aa 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -271,7 +271,7 @@ void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode,
OSL_FAIL( "Accelerator::InsertItem(): KeyCode with KeyCode 0 not allowed" );
delete pEntry;
}
- else if ( mpData->maKeyMap.insert( std::make_pair( nCode, pEntry ) ).second )
+ else if ( !mpData->maKeyMap.insert( std::make_pair( nCode, pEntry ) ).second )
{
OSL_TRACE( "Accelerator::InsertItem(): KeyCode (Key: %lx) already exists", nCode );
delete pEntry;