diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 19:48:07 +0000 |
|---|---|---|
| committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 19:48:07 +0000 |
| commit | fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70 (patch) | |
| tree | 724178e38d88307e7b4129479006dc2ec122c410 /src/device-manager.cpp | |
| parent | Run clang-tidy’s modernize-use-noexcept pass. (diff) | |
| download | inkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.tar.gz inkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.zip | |
Run clang-tidy’s modernize-use-emplace pass.
This reduces the boilerplate required to add a new element to a
container.
Diffstat (limited to 'src/device-manager.cpp')
| -rw-r--r-- | src/device-manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device-manager.cpp b/src/device-manager.cpp index da85860c2..5ed11b9b2 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -347,7 +347,7 @@ DeviceManagerImpl::DeviceManagerImpl() : InputDeviceImpl* device = new InputDeviceImpl(dev, knownIDs); device->reference(); - devices.push_back(Glib::RefPtr<InputDeviceImpl>(device)); + devices.emplace_back(device); } } } @@ -441,7 +441,7 @@ std::list<Glib::RefPtr<InputDevice const> > DeviceManagerImpl::getDevices() { std::list<Glib::RefPtr<InputDevice const> > tmp; for ( std::list<Glib::RefPtr<InputDeviceImpl> >::const_iterator it = devices.begin(); it != devices.end(); ++it ) { - tmp.push_back(*it); + tmp.emplace_back(*it); } return tmp; } |
