summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-05-13 18:51:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-15 08:48:06 +0200
commit4f6931d68664237f7f7eb1f55988b713034c77ba (patch)
tree35b71c92e3d0660890dd79648e9c1c62cdcc1610 /vcl
parent36e62098c8c541c4a3fb63eced591cf29ac56e4a (diff)
use more try_emplace
specifically looking for the pattern if (map.find(...) == map.end() map[...] = value Change-Id: I99f20d73f6e71a10726c9d39d8644c2e51120091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94151 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/app/salinfo.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index a19ca597f9c5..2787797a6ce5 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -112,10 +112,7 @@ bool WinSalSystem::initMonitors()
aDev.DeviceString[127] = 0;
OUString aDeviceName( o3tl::toU(aDev.DeviceName) );
OUString aDeviceString( o3tl::toU(aDev.DeviceString) );
- if( aDeviceStringCount.find( aDeviceString ) == aDeviceStringCount.end() )
- aDeviceStringCount[ aDeviceString ] = 1;
- else
- aDeviceStringCount[ aDeviceString ]++;
+ aDeviceStringCount[ aDeviceString ]++;
m_aDeviceNameToMonitor[ aDeviceName ] = m_aMonitors.size();
m_aMonitors.push_back( DisplayMonitor( aDeviceString,
tools::Rectangle() ) );