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/widget | |
| 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/widget')
| -rw-r--r-- | src/ui/widget/color-icc-selector.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp index 9e1a0c05b..bddbb60e8 100644 --- a/src/ui/widget/color-icc-selector.cpp +++ b/src/ui/widget/color-icc-selector.cpp @@ -397,10 +397,10 @@ void ColorICCSelector::init() for (size_t i = 0; i < maxColorspaceComponentCount; i++) { #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) if (i < things.size()) { - _impl->_compUI.push_back(ComponentUI(things[i])); + _impl->_compUI.emplace_back(things[i]); } else { - _impl->_compUI.push_back(ComponentUI()); + _impl->_compUI.emplace_back(); } std::string labelStr = (i < things.size()) ? things[i].name.c_str() : ""; diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index b8eeca00d..58af30fc9 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -86,13 +86,13 @@ static std::vector<std::string> lscape_papers; static void fill_landscape_papers() { - lscape_papers.push_back("US #10 Envelope"); - lscape_papers.push_back("DL Envelope"); - lscape_papers.push_back("Banner 468x60"); - lscape_papers.push_back("Business Card (ISO 7810)"); - lscape_papers.push_back("Business Card (US)"); - lscape_papers.push_back("Business Card (Europe)"); - lscape_papers.push_back("Business Card (Aus/NZ)"); + lscape_papers.emplace_back("US #10 Envelope"); + lscape_papers.emplace_back("DL Envelope"); + lscape_papers.emplace_back("Banner 468x60"); + lscape_papers.emplace_back("Business Card (ISO 7810)"); + lscape_papers.emplace_back("Business Card (US)"); + lscape_papers.emplace_back("Business Card (Europe)"); + lscape_papers.emplace_back("Business Card (Aus/NZ)"); } static PaperSizeRec const inkscape_papers[] = { |
