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/libnrtype | |
| 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/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 2 | ||||
| -rw-r--r-- | src/libnrtype/Layout-TNG-Input.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index eac18a76e..99717bb77 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -453,7 +453,7 @@ void font_factory::GetUIFamilies(std::vector<PangoFontFamily *>& out) std::cerr << "Ignoring font '" << displayName << "'" << std::endl; continue; } - sorted.push_back(std::make_pair(families[currentFamily], displayName)); + sorted.emplace_back(families[currentFamily], displayName); } std::sort(sorted.begin(), sorted.end(), ustringPairSort); diff --git a/src/libnrtype/Layout-TNG-Input.cpp b/src/libnrtype/Layout-TNG-Input.cpp index c5ea9b03a..7101ee063 100644 --- a/src/libnrtype/Layout-TNG-Input.cpp +++ b/src/libnrtype/Layout-TNG-Input.cpp @@ -117,7 +117,7 @@ void Layout::appendControlCode(TextControlCode code, void *source_cookie, double // more saving of the parameters void Layout::appendWrapShape(Shape const *shape, DisplayAlign display_align) { - _input_wrap_shapes.push_back(InputWrapShape()); + _input_wrap_shapes.emplace_back(); _input_wrap_shapes.back().shape = shape; _input_wrap_shapes.back().display_align = display_align; } |
