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/ui/tool/path-manipulator.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/ui/tool/path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index ce4a02a2b..2369a75d4 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -295,11 +295,11 @@ add_or_replace_if_extremum(std::vector< std::pair<NodeList::iterator, double> > if (testvalue > extrvalue) { // replace all extreme nodes with the new one vec.clear(); - vec.push_back( std::pair<NodeList::iterator, double>( node, t ) ); + vec.emplace_back( node, t ); extrvalue = testvalue; } else if ( Geom::are_near(testvalue, extrvalue) ) { // very rare but: extremum node at the same extreme value!!! so add it to the list - vec.push_back( std::pair<NodeList::iterator, double>( node, t ) ); + vec.emplace_back( node, t ); } } |
