summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attribute-sort-util.cpp4
-rw-r--r--src/conditions.cpp2
-rw-r--r--src/device-manager.cpp4
-rw-r--r--src/extension/internal/pdfinput/svg-builder.cpp2
-rw-r--r--src/graphlayout.cpp2
-rw-r--r--src/helper/geom-pathstroke.cpp12
-rw-r--r--src/helper/geom.cpp28
-rw-r--r--src/inkview.cpp2
-rw-r--r--src/libnrtype/FontFactory.cpp2
-rw-r--r--src/libnrtype/Layout-TNG-Input.cpp2
-rw-r--r--src/livarot/Path.cpp8
-rw-r--r--src/live_effects/lpe-embrodery-stitch-ordering.cpp2
-rw-r--r--src/live_effects/lpe-knot.cpp2
-rw-r--r--src/live_effects/lpe-measure-segments.cpp10
-rw-r--r--src/live_effects/lpe-powerstroke.cpp16
-rw-r--r--src/live_effects/parameter/powerstrokepointarray.cpp4
-rw-r--r--src/object-snapper.cpp6
-rw-r--r--src/object/box3d.cpp4
-rw-r--r--src/object/sp-ellipse.cpp10
-rw-r--r--src/object/sp-flowtext.cpp2
-rw-r--r--src/object/sp-guide.cpp8
-rw-r--r--src/object/sp-image.cpp8
-rw-r--r--src/object/sp-item-update-cns.cpp2
-rw-r--r--src/object/sp-item.cpp12
-rw-r--r--src/object/sp-path.cpp2
-rw-r--r--src/object/sp-rect.cpp26
-rw-r--r--src/object/sp-shape.cpp12
-rw-r--r--src/object/sp-spiral.cpp2
-rw-r--r--src/object/sp-star.cpp2
-rw-r--r--src/object/sp-text.cpp2
-rw-r--r--src/pure-transform.cpp2
-rw-r--r--src/removeoverlap.cpp2
-rw-r--r--src/resource-manager.cpp6
-rw-r--r--src/satisfied-guide-cns.cpp2
-rw-r--r--src/selection-chemistry.cpp2
-rw-r--r--src/selection.cpp6
-rw-r--r--src/seltrans.cpp4
-rw-r--r--src/snap-candidate.h4
-rw-r--r--src/snap.cpp10
-rw-r--r--src/ui/clipboard.cpp24
-rw-r--r--src/ui/dialog/aboutbox.cpp2
-rw-r--r--src/ui/dialog/align-and-distribute.cpp2
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp4
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp6
-rw-r--r--src/ui/dialog/find.cpp4
-rw-r--r--src/ui/dialog/glyphs.cpp302
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp8
-rw-r--r--src/ui/dialog/object-attributes.cpp4
-rw-r--r--src/ui/dialog/object-properties.cpp38
-rw-r--r--src/ui/dialog/swatches.cpp2
-rw-r--r--src/ui/dialog/symbols.cpp2
-rw-r--r--src/ui/dialog/transformation.cpp4
-rw-r--r--src/ui/tool/control-point-selection.cpp2
-rw-r--r--src/ui/tool/node.cpp16
-rw-r--r--src/ui/tool/path-manipulator.cpp4
-rw-r--r--src/ui/tool/transform-handle-set.cpp4
-rw-r--r--src/ui/tools/flood-tool.cpp2
-rw-r--r--src/ui/tools/freehand-base.cpp2
-rw-r--r--src/ui/tools/pencil-tool.cpp2
-rw-r--r--src/ui/widget/color-icc-selector.cpp4
-rw-r--r--src/ui/widget/page-sizer.cpp14
61 files changed, 345 insertions, 345 deletions
diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp
index 28a4d4f5a..5df78eab6 100644
--- a/src/attribute-sort-util.cpp
+++ b/src/attribute-sort-util.cpp
@@ -96,7 +96,7 @@ void sp_attribute_sort_element(Node *repr) {
Glib::ustring value = (const char*)iter->value;
// C++11 my_list.emlace_back(attribute, value);
- my_list.push_back(std::make_pair(attribute,value));
+ my_list.emplace_back(attribute,value);
}
std::sort(my_list.begin(), my_list.end(), cmp);
// Delete all attributes.
@@ -183,7 +183,7 @@ void sp_attribute_sort_style(Node* repr, SPCSSAttr *css) {
Glib::ustring value = (const char*)iter->value;
// C++11 my_list.emlace_back(property, value);
- my_list.push_back(std::make_pair(property,value));
+ my_list.emplace_back(property,value);
}
std::sort(my_list.begin(), my_list.end(), cmp);
// Delete all attributes.
diff --git a/src/conditions.cpp b/src/conditions.cpp
index 4188b75e1..25084a9ac 100644
--- a/src/conditions.cpp
+++ b/src/conditions.cpp
@@ -139,7 +139,7 @@ static std::vector<Glib::ustring> splitByWhitespace(gchar const *value) {
gchar *part = g_strstrip(str);
if ( 0 == *part )
continue;
- parts.push_back(part);
+ parts.emplace_back(part);
}
g_strfreev(strlist);
return parts;
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;
}
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 3fdc3db55..50a7685b8 100644
--- a/src/extension/internal/pdfinput/svg-builder.cpp
+++ b/src/extension/internal/pdfinput/svg-builder.cpp
@@ -124,7 +124,7 @@ void SvgBuilder::_init() {
font_factory::Default()->GetUIFamilies(families);
for ( std::vector<PangoFontFamily *>::iterator iter = families.begin();
iter != families.end(); ++iter ) {
- _availableFontNames.push_back(pango_font_family_get_name(*iter));
+ _availableFontNames.emplace_back(pango_font_family_get_name(*iter));
}
_transp_group_stack = nullptr;
diff --git a/src/graphlayout.cpp b/src/graphlayout.cpp
index e347ceb5a..1cb2442e8 100644
--- a/src/graphlayout.cpp
+++ b/src/graphlayout.cpp
@@ -175,7 +175,7 @@ void graphlayout(std::vector<SPItem*> const & items) {
if (v_pair != nodelookup.end()) {
unsigned v = v_pair->second;
//cout << "Edge: (" << u <<","<<v<<")"<<endl;
- es.push_back(make_pair(u, v));
+ es.emplace_back(u, v);
if (conn->style->marker_end.set) {
if (directed && strcmp(conn->style->marker_end.value, "none")) {
constraints.push_back(new SeparationConstraint(YDIM, v, u,
diff --git a/src/helper/geom-pathstroke.cpp b/src/helper/geom-pathstroke.cpp
index b9cc1a38f..23d133e08 100644
--- a/src/helper/geom-pathstroke.cpp
+++ b/src/helper/geom-pathstroke.cpp
@@ -444,13 +444,13 @@ void extrapolate_join_internal(join_data jd, int alternative)
if( circle2.contains( startPt ) && !circle1.contains( endPt ) ) {
// std::cout << "Expand circle1" << std::endl;
p = expand_circle( circle1, circle2, startPt, tang1 );
- points.push_back( ShapeIntersection( 0, 0, p) );
- points.push_back( ShapeIntersection( 0, 0, p) );
+ points.emplace_back( 0, 0, p );
+ points.emplace_back( 0, 0, p );
} else if( circle1.contains( endPt ) && !circle2.contains( startPt ) ) {
// std::cout << "Expand circle2" << std::endl;
p = expand_circle( circle2, circle1, endPt, tang2 );
- points.push_back( ShapeIntersection( 0, 0, p) );
- points.push_back( ShapeIntersection( 0, 0, p) );
+ points.emplace_back( 0, 0, p );
+ points.emplace_back( 0, 0, p );
} else {
// std::cout << "Either both points inside or both outside" << std::endl;
return( miter_clip_join(jd) );
@@ -470,8 +470,8 @@ void extrapolate_join_internal(join_data jd, int alternative)
( circle1.contains( endPt ) && !circle2.contains( startPt ) ) ) {
Geom::Point apex = adjust_circles( circle1, circle2, startPt, endPt, tang1, tang2 );
- points.push_back( ShapeIntersection( 0, 0, apex) );
- points.push_back( ShapeIntersection( 0, 0, apex) );
+ points.emplace_back( 0, 0, apex );
+ points.emplace_back( 0, 0, apex );
} else {
// std::cout << "Either both points inside or both outside" << std::endl;
return( miter_clip_join(jd) );
diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp
index e83fb42f2..253188f1d 100644
--- a/src/helper/geom.cpp
+++ b/src/helper/geom.cpp
@@ -707,7 +707,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(d2 < m_distance_tolerance_square)
{
- m_points.push_back(Geom::Point(x2, y2));
+ m_points.emplace_back(x2, y2);
return;
}
}
@@ -715,7 +715,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(d3 < m_distance_tolerance_square)
{
- m_points.push_back(Geom::Point(x3, y3));
+ m_points.emplace_back(x3, y3);
return;
}
}
@@ -728,7 +728,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(m_angle_tolerance < curve_angle_tolerance_epsilon)
{
- m_points.push_back(Geom::Point(x23, y23));
+ m_points.emplace_back(x23, y23);
return;
}
@@ -739,8 +739,8 @@ recursive_bezier4(const double x1, const double y1,
if(da1 < m_angle_tolerance)
{
- m_points.push_back(Geom::Point(x2, y2));
- m_points.push_back(Geom::Point(x3, y3));
+ m_points.emplace_back(x2, y2);
+ m_points.emplace_back(x3, y3);
return;
}
@@ -748,7 +748,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(da1 > m_cusp_limit)
{
- m_points.push_back(Geom::Point(x3, y3));
+ m_points.emplace_back(x3, y3);
return;
}
}
@@ -762,7 +762,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(m_angle_tolerance < curve_angle_tolerance_epsilon)
{
- m_points.push_back(Geom::Point(x23, y23));
+ m_points.emplace_back(x23, y23);
return;
}
@@ -773,8 +773,8 @@ recursive_bezier4(const double x1, const double y1,
if(da1 < m_angle_tolerance)
{
- m_points.push_back(Geom::Point(x2, y2));
- m_points.push_back(Geom::Point(x3, y3));
+ m_points.emplace_back(x2, y2);
+ m_points.emplace_back(x3, y3);
return;
}
@@ -782,7 +782,7 @@ recursive_bezier4(const double x1, const double y1,
{
if(da1 > m_cusp_limit)
{
- m_points.push_back(Geom::Point(x2, y2));
+ m_points.emplace_back(x2, y2);
return;
}
}
@@ -799,7 +799,7 @@ recursive_bezier4(const double x1, const double y1,
//----------------------
if(m_angle_tolerance < curve_angle_tolerance_epsilon)
{
- m_points.push_back(Geom::Point(x23, y23));
+ m_points.emplace_back(x23, y23);
return;
}
@@ -815,7 +815,7 @@ recursive_bezier4(const double x1, const double y1,
{
// Finally we can stop the recursion
//----------------------
- m_points.push_back(Geom::Point(x23, y23));
+ m_points.emplace_back(x23, y23);
return;
}
@@ -823,13 +823,13 @@ recursive_bezier4(const double x1, const double y1,
{
if(da1 > m_cusp_limit)
{
- m_points.push_back(Geom::Point(x2, y2));
+ m_points.emplace_back(x2, y2);
return;
}
if(da2 > m_cusp_limit)
{
- m_points.push_back(Geom::Point(x3, y3));
+ m_points.emplace_back(x3, y3);
return;
}
}
diff --git a/src/inkview.cpp b/src/inkview.cpp
index ce75f72f8..a8823e5a0 100644
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
@@ -80,7 +80,7 @@ get_valid_files(std::vector<Glib::ustring> filenames,
std::vector<Glib::ustring> new_filenames;
Glib::Dir directory(file);
for (auto new_file: directory) {
- new_filenames.push_back(Glib::build_filename(file, new_file));
+ new_filenames.emplace_back(Glib::build_filename(file, new_file));
}
std::vector<Glib::ustring> new_valid_files = get_valid_files(new_filenames, recursive);
valid_files.insert(valid_files.end(), new_valid_files.begin(), new_valid_files.end());
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;
}
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp
index 5fa418968..a43bc3769 100644
--- a/src/livarot/Path.cpp
+++ b/src/livarot/Path.cpp
@@ -416,7 +416,7 @@ int Path::AddPoint(Geom::Point const &iPt, bool mvto)
}
int const n = pts.size();
- pts.push_back(path_lineto(mvto ? polyline_moveto : polyline_lineto, iPt));
+ pts.emplace_back(mvto ? polyline_moveto : polyline_lineto, iPt);
return n;
}
@@ -444,7 +444,7 @@ int Path::AddPoint(Geom::Point const &iPt, int ip, double it, bool mvto)
}
int const n = pts.size();
- pts.push_back(path_lineto(mvto ? polyline_moveto : polyline_lineto, iPt, ip, it));
+ pts.emplace_back(mvto ? polyline_moveto : polyline_lineto, iPt, ip, it);
return n;
}
@@ -459,7 +459,7 @@ int Path::AddForcedPoint(Geom::Point const &iPt)
}
int const n = pts.size();
- pts.push_back(path_lineto(polyline_forced, pts[n - 1].p));
+ pts.emplace_back(polyline_forced, pts[n - 1].p);
return n;
}
@@ -476,7 +476,7 @@ int Path::AddForcedPoint(Geom::Point const &iPt, int /*ip*/, double /*it*/)
}
int const n = pts.size();
- pts.push_back(path_lineto(polyline_forced, pts[n - 1].p, pts[n - 1].piece, pts[n - 1].t));
+ pts.emplace_back(polyline_forced, pts[n - 1].p, pts[n - 1].piece, pts[n - 1].t);
return n;
}
diff --git a/src/live_effects/lpe-embrodery-stitch-ordering.cpp b/src/live_effects/lpe-embrodery-stitch-ordering.cpp
index 86abf2d68..7cd69e1b6 100644
--- a/src/live_effects/lpe-embrodery-stitch-ordering.cpp
+++ b/src/live_effects/lpe-embrodery-stitch-ordering.cpp
@@ -543,7 +543,7 @@ void OrderingGroup::AddNeighbors(OrderingGroup *nghb)
{
for (int iThis = 0; iThis < nEndPoints; iThis++) {
for (int iNghb = 0; iNghb < nghb->nEndPoints; iNghb++) {
- endpoints[iThis]->nearest.push_back(OrderingGroupNeighbor(endpoints[iThis], nghb->endpoints[iNghb]));
+ endpoints[iThis]->nearest.emplace_back(endpoints[iThis], nghb->endpoints[iNghb]);
}
}
}
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 3640e8e43..07a6dc8fb 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -406,7 +406,7 @@ LPEKnot::doEffect_path (Geom::PathVector const &path_in)
if (i0 == gpaths.size() ) {THROW_EXCEPTION("lpe-knot error: group member not recognized");}// this should not happen...
std::vector<Interval> dom;
- dom.push_back(Interval(0., size_nondegenerate(gpaths[i0])));
+ dom.emplace_back(0., size_nondegenerate(gpaths[i0]));
for (unsigned p = 0; p < crossing_points.size(); p++){
if ( (crossing_points[p].i == i0) || (crossing_points[p].j == i0) ) {
unsigned i = crossing_points[p].i;
diff --git a/src/live_effects/lpe-measure-segments.cpp b/src/live_effects/lpe-measure-segments.cpp
index fd016f24c..f92e14b4a 100644
--- a/src/live_effects/lpe-measure-segments.cpp
+++ b/src/live_effects/lpe-measure-segments.cpp
@@ -882,7 +882,7 @@ LPEMeasureSegments::doBeforeEffect (SPLPEItem const* lpeitem)
Geom::Point point = (*iter);
double dproj = Inkscape::Util::Quantity::convert(distance_projection, display_unit.c_str(), unit.get_abbreviation());
Geom::Coord xpos = maxdistance + dproj;
- result.push_back(Geom::Point(xpos, point[Geom::Y]));
+ result.emplace_back(xpos, point[Geom::Y]);
}
std::sort (result.begin(), result.end(), sortPoints);
Geom::Path path;
@@ -1083,11 +1083,11 @@ LPEMeasureSegments::doBeforeEffect (SPLPEItem const* lpeitem)
items.push_back(texton);
if (!hide_arrows) {
if (arrows_outside) {
- items.push_back(Glib::ustring("ArrowDINout-start"));
- items.push_back(Glib::ustring("ArrowDINout-end"));
+ items.emplace_back("ArrowDINout-start");
+ items.emplace_back("ArrowDINout-end");
} else {
- items.push_back(Glib::ustring("ArrowDIN-start"));
- items.push_back(Glib::ustring("ArrowDIN-end"));
+ items.emplace_back("ArrowDIN-start");
+ items.emplace_back("ArrowDIN-end");
}
}
if (((Geom::are_near(prev, prev_stored, 0.01) && Geom::are_near(next, next_stored, 0.01)) ||
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 32f9a6b82..c20476922 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -245,18 +245,18 @@ LPEPowerStroke::doOnApply(SPLPEItem const* lpeitem)
item->updateRepr();
if (pathv.empty()) {
- points.push_back( Geom::Point(0.2,width) );
- points.push_back( Geom::Point(0.5,width) );
- points.push_back( Geom::Point(0.8,width) );
+ points.emplace_back(0.2,width );
+ points.emplace_back(0.5,width );
+ points.emplace_back(0.8,width );
} else {
Geom::Path const &path = pathv.front();
Geom::Path::size_type const size = path.size_default();
if (!path.closed()) {
- points.push_back( Geom::Point(0.2,width) );
+ points.emplace_back(0.2,width );
}
- points.push_back( Geom::Point(0.5*size,width) );
+ points.emplace_back(0.5*size,width );
if (!path.closed()) {
- points.push_back( Geom::Point(size - 0.2,width) );
+ points.emplace_back(size - 0.2,width );
}
}
offset_points.set_scale_width(scale_width);
@@ -631,8 +631,8 @@ LPEPowerStroke::doEffect_path (Geom::PathVector const & path_in)
// depending on cap type, these first and last points have width zero or take the width from the closest width point.
ts.insert(ts.begin(), Point( pwd2_in.domain().min(),
(start_linecap==LINECAP_ZERO_WIDTH) ? 0. : ts.front()[Geom::Y]) );
- ts.push_back( Point( pwd2_in.domain().max(),
- (end_linecap==LINECAP_ZERO_WIDTH) ? 0. : ts.back()[Geom::Y]) );
+ ts.emplace_back( pwd2_in.domain().max(),
+ (end_linecap==LINECAP_ZERO_WIDTH) ? 0. : ts.back()[Geom::Y] );
}
// do the interpolation in a coordinate system that is more alike to the on-canvas knots,
diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp
index 12f72a143..4afe35e47 100644
--- a/src/live_effects/parameter/powerstrokepointarray.cpp
+++ b/src/live_effects/parameter/powerstrokepointarray.cpp
@@ -54,7 +54,7 @@ void PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const &po
{
// scale each width knot with the average scaling in X and Y
Geom::Coord const A = (*point_it)[Geom::Y] * ((postmul.expansionX() + postmul.expansionY()) / 2);
- result.push_back(Geom::Point((*point_it)[Geom::X], A));
+ result.emplace_back((*point_it)[Geom::X], A);
}
param_set_and_write_new_value(result);
}
@@ -98,7 +98,7 @@ PowerStrokePointArrayParam::reverse_controlpoints(bool write)
for (unsigned int i = 0; i < _vector.size(); ++i) {
Geom::Point control_pos = last_pwd2.valueAt(_vector[i][Geom::X]);
double new_pos = Geom::nearest_time(control_pos, pwd2_in_reverse);
- controlpoints.push_back(Geom::Point(new_pos,_vector[i][Geom::Y]));
+ controlpoints.emplace_back(new_pos,_vector[i][Geom::Y]);
_vector[i][Geom::X] = new_pos;
}
if (write) {
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index 6764f351c..4bf8f5fbf 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -562,7 +562,7 @@ void Inkscape::ObjectSnapper::_snapPaths(IntermSnapResults &isr,
Geom::Point sp_tangent_doc = curve->unitTangentAt(*np);
sp_tangent_dt = dt->doc2dt(sp_tangent_doc) - dt->doc2dt(Geom::Point(0,0));
}
- isr.curves.push_back(SnappedCurve(sp_dt, sp_tangent_dt, num_path, index, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, curve, p.getSourceType(), p.getSourceNum(), it_p->target_type, it_p->target_bbox));
+ isr.curves.emplace_back(sp_dt, sp_tangent_dt, num_path, index, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, curve, p.getSourceType(), p.getSourceNum(), it_p->target_type, it_p->target_bbox);
if (snap_tang || snap_perp) {
// For each curve that's within snapping range, we will now also search for tangential and perpendicular snaps
_snapPathsTangPerp(snap_tang, snap_perp, isr, p, curve, dt);
@@ -846,7 +846,7 @@ void Inkscape::ObjectSnapper::_snapPathsTangPerp(bool snap_tang, bool snap_perp,
for (std::vector<double>::const_iterator t = ts.begin(); t != ts.end(); ++t) {
point_dt = dt->doc2dt(curve->pointAt(*t));
dist = Geom::distance(point_dt, p.getPoint());
- isr.points.push_back(SnappedPoint(point_dt, p.getSourceType(), p.getSourceNum(), SNAPTARGET_PATH_TANGENTIAL, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, true));
+ isr.points.emplace_back(point_dt, p.getSourceType(), p.getSourceNum(), SNAPTARGET_PATH_TANGENTIAL, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, true);
}
}
@@ -859,7 +859,7 @@ void Inkscape::ObjectSnapper::_snapPathsTangPerp(bool snap_tang, bool snap_perp,
for (std::vector<double>::const_iterator t = ts.begin(); t != ts.end(); ++t) {
point_dt = dt->doc2dt(curve->pointAt(*t));
dist = Geom::distance(point_dt, p.getPoint());
- isr.points.push_back(SnappedPoint(point_dt, p.getSourceType(), p.getSourceNum(), SNAPTARGET_PATH_PERPENDICULAR, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, true));
+ isr.points.emplace_back(point_dt, p.getSourceType(), p.getSourceNum(), SNAPTARGET_PATH_PERPENDICULAR, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), false, true);
}
}
}
diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp
index 7b5e44f65..df95f4f84 100644
--- a/src/object/box3d.cpp
+++ b/src/object/box3d.cpp
@@ -1311,8 +1311,8 @@ gchar *SPBox3D::description() const {
static inline void
box3d_push_back_corner_pair(SPBox3D const *box, std::list<std::pair<Geom::Point, Geom::Point> > &pts, int c1, int c2) {
- pts.push_back(std::make_pair(box3d_get_corner_screen(box, c1, false),
- box3d_get_corner_screen(box, c2, false)));
+ pts.emplace_back(box3d_get_corner_screen(box, c1, false),
+ box3d_get_corner_screen(box, c2, false));
}
void SPBox3D::convert_to_guides() const {
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp
index 7856429e3..97ad7f74c 100644
--- a/src/object/sp-ellipse.cpp
+++ b/src/object/sp-ellipse.cpp
@@ -577,7 +577,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
for (double angle = 0; angle < SP_2PI; angle += M_PI_2) {
if (Geom::AngleInterval(this->start, this->end, true).contains(angle)) {
Geom::Point pt = this->getPointAtAngle(angle) * i2dt;
- p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT));
+ p.emplace_back(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT);
}
}
}
@@ -592,12 +592,12 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP) && slice &&
this->arc_type == SP_GENERIC_ELLIPSE_ARC_TYPE_SLICE) {
Geom::Point pt = Geom::Point(cx, cy) * i2dt;
- p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP);
}
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) {
Geom::Point pt = Geom::Point(cx, cy) * i2dt;
- p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT));
+ p.emplace_back(pt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
}
// And if we have a slice, also snap to the endpoints
@@ -605,13 +605,13 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
// Add the start point, if it's not coincident with a quadrant point
if (!Geom::are_near(std::fmod(this->start, M_PI_2), 0)) {
Geom::Point pt = this->getPointAtAngle(this->start) * i2dt;
- p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP);
}
// Add the end point, if it's not coincident with a quadrant point
if (!Geom::are_near(std::fmod(this->end, M_PI_2), 0)) {
Geom::Point pt = this->getPointAtAngle(this->end) * i2dt;
- p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP);
}
}
}
diff --git a/src/object/sp-flowtext.cpp b/src/object/sp-flowtext.cpp
index 334282103..c0e23ee97 100644
--- a/src/object/sp-flowtext.cpp
+++ b/src/object/sp-flowtext.cpp
@@ -294,7 +294,7 @@ void SPFlowtext::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inksca
boost::optional<Geom::Point> pt = layout->baselineAnchorPoint();
if (pt) {
- p.push_back(Inkscape::SnapCandidatePoint((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR));
+ p.emplace_back((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR);
}
}
}
diff --git a/src/object/sp-guide.cpp b/src/object/sp-guide.cpp
index de15c7bcf..0b8558230 100644
--- a/src/object/sp-guide.cpp
+++ b/src/object/sp-guide.cpp
@@ -250,10 +250,10 @@ void sp_guide_create_guides_around_page(SPDesktop *dt)
Geom::Point B(C[Geom::X], 0);
Geom::Point D(0, C[Geom::Y]);
- pts.push_back(std::pair<Geom::Point, Geom::Point>(A, B));
- pts.push_back(std::pair<Geom::Point, Geom::Point>(B, C));
- pts.push_back(std::pair<Geom::Point, Geom::Point>(C, D));
- pts.push_back(std::pair<Geom::Point, Geom::Point>(D, A));
+ pts.emplace_back(A, B);
+ pts.emplace_back(B, C);
+ pts.emplace_back(C, D);
+ pts.emplace_back(D, A);
sp_guide_pt_pairs_to_guides(doc, pts);
diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp
index a1efef51d..cdbe0ef4a 100644
--- a/src/object/sp-image.cpp
+++ b/src/object/sp-image.cpp
@@ -659,10 +659,10 @@ void SPImage::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
Geom::Affine const i2d (this->i2dt_affine ());
- p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x0, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x0, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x1, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x1, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER));
+ p.emplace_back(Geom::Point(x0, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER);
+ p.emplace_back(Geom::Point(x0, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER);
+ p.emplace_back(Geom::Point(x1, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER);
+ p.emplace_back(Geom::Point(x1, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER);
}
}
}
diff --git a/src/object/sp-item-update-cns.cpp b/src/object/sp-item-update-cns.cpp
index cae95badd..a7f7958c3 100644
--- a/src/object/sp-item-update-cns.cpp
+++ b/src/object/sp-item-update-cns.cpp
@@ -29,7 +29,7 @@ void sp_item_update_cns(SPItem &item, SPDesktop const &desktop)
== item.constraints.end() )
{
item.constraints.push_back(cn);
- cn.g->attached_items.push_back(SPGuideAttachment(&item, cn.snappoint_ix));
+ cn.g->attached_items.emplace_back(&item, cn.snappoint_ix);
}
}
}
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index 59ea0a554..286886a1a 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -982,7 +982,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap
// Get the snappoints at the item's center
if (snapprefs != nullptr && snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER)) {
- p.push_back(Inkscape::SnapCandidatePoint(getCenter(), Inkscape::SNAPSOURCE_ROTATION_CENTER, Inkscape::SNAPTARGET_ROTATION_CENTER));
+ p.emplace_back(getCenter(), Inkscape::SNAPSOURCE_ROTATION_CENTER, Inkscape::SNAPTARGET_ROTATION_CENTER);
}
// Get the snappoints of clipping paths and mask, if any
@@ -1006,7 +1006,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap
// All snappoints are in desktop coordinates, but the item's transformation is
// in document coordinates. Hence the awkward construction below
Geom::Point pt = desktop->dt2doc((*p_orig).getPoint()) * i2dt_affine();
- p.push_back(Inkscape::SnapCandidatePoint(pt, (*p_orig).getSourceType(), (*p_orig).getTargetType()));
+ p.emplace_back(pt, (*p_orig).getSourceType(), (*p_orig).getTargetType());
}
}
}
@@ -1735,10 +1735,10 @@ void SPItem::convert_to_guides() const {
Geom::Point B(A[Geom::X], C[Geom::Y]);
Geom::Point D(C[Geom::X], A[Geom::Y]);
- pts.push_back(std::make_pair(A, B));
- pts.push_back(std::make_pair(B, C));
- pts.push_back(std::make_pair(C, D));
- pts.push_back(std::make_pair(D, A));
+ pts.emplace_back(A, B);
+ pts.emplace_back(B, C);
+ pts.emplace_back(C, D);
+ pts.emplace_back(D, A);
sp_guide_pt_pairs_to_guides(document, pts);
}
diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp
index 44070b6a3..e2f6e6c99 100644
--- a/src/object/sp-path.cpp
+++ b/src/object/sp-path.cpp
@@ -101,7 +101,7 @@ void SPPath::convert_to_guides() const {
// only add curves for straight line segments
if( is_straight_curve(*cit) )
{
- pts.push_back(std::make_pair(cit->initialPoint() * i2dt, cit->finalPoint() * i2dt));
+ pts.emplace_back(cit->initialPoint() * i2dt, cit->finalPoint() * i2dt);
}
}
}
diff --git a/src/object/sp-rect.cpp b/src/object/sp-rect.cpp
index e3c5bf450..0a3447f81 100644
--- a/src/object/sp-rect.cpp
+++ b/src/object/sp-rect.cpp
@@ -518,21 +518,21 @@ void SPRect::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::
Geom::Point p3 = Geom::Point(this->x.computed + this->width.computed, this->y.computed) * i2dt;
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_RECT_CORNER)) {
- p.push_back(Inkscape::SnapCandidatePoint(p0, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(p1, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(p2, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER));
- p.push_back(Inkscape::SnapCandidatePoint(p3, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER));
+ p.emplace_back(p0, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER);
+ p.emplace_back(p1, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER);
+ p.emplace_back(p2, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER);
+ p.emplace_back(p3, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER);
}
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_LINE_MIDPOINT)) {
- p.push_back(Inkscape::SnapCandidatePoint((p0 + p1)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT));
- p.push_back(Inkscape::SnapCandidatePoint((p1 + p2)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT));
- p.push_back(Inkscape::SnapCandidatePoint((p2 + p3)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT));
- p.push_back(Inkscape::SnapCandidatePoint((p3 + p0)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT));
+ p.emplace_back((p0 + p1)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT);
+ p.emplace_back((p1 + p2)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT);
+ p.emplace_back((p2 + p3)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT);
+ p.emplace_back((p3 + p0)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT);
}
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) {
- p.push_back(Inkscape::SnapCandidatePoint((p0 + p2)/2, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT));
+ p.emplace_back((p0 + p2)/2, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
}
}
@@ -554,10 +554,10 @@ void SPRect::convert_to_guides() const {
Geom::Point A3(Geom::Point(this->x.computed + this->width.computed, this->y.computed + this->height.computed) * i2dt);
Geom::Point A4(Geom::Point(this->x.computed + this->width.computed, this->y.computed) * i2dt);
- pts.push_back(std::make_pair(A1, A2));
- pts.push_back(std::make_pair(A2, A3));
- pts.push_back(std::make_pair(A3, A4));
- pts.push_back(std::make_pair(A4, A1));
+ pts.emplace_back(A1, A2);
+ pts.emplace_back(A2, A3);
+ pts.emplace_back(A3, A4);
+ pts.emplace_back(A4, A1);
sp_guide_pt_pairs_to_guides(this->document, pts);
}
diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp
index cb636c100..1f4572428 100644
--- a/src/object/sp-shape.cpp
+++ b/src/object/sp-shape.cpp
@@ -1132,14 +1132,14 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
Geom::OptRect bbox = this->desktopVisualBounds();
if (bbox) {
- p.push_back(Inkscape::SnapCandidatePoint(bbox->midpoint(), Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT));
+ p.emplace_back(bbox->midpoint(), Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
}
}
for(Geom::PathVector::const_iterator path_it = pathv.begin(); path_it != pathv.end(); ++path_it) {
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP)) {
// Add the first point of the path
- p.push_back(Inkscape::SnapCandidatePoint(path_it->initialPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ p.emplace_back(path_it->initialPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP);
}
Geom::Path::const_iterator curve_it1 = path_it->begin(); // incoming curve
@@ -1150,7 +1150,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
// For each path: consider midpoints of line segments for snapping
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_LINE_MIDPOINT)) {
if (Geom::LineSegment const* line_segment = dynamic_cast<Geom::LineSegment const*>(&(*curve_it1))) {
- p.push_back(Inkscape::SnapCandidatePoint(Geom::middle_point(*line_segment) * i2dt, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT));
+ p.emplace_back(Geom::middle_point(*line_segment) * i2dt, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT);
}
}
@@ -1158,7 +1158,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP) && !path_it->closed()) {
// Add the last point of the path, but only for open paths
// (for closed paths the first and last point will coincide)
- p.push_back(Inkscape::SnapCandidatePoint((*curve_it1).finalPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
+ p.emplace_back((*curve_it1).finalPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP);
}
} else {
/* Test whether to add the node between curve_it1 and curve_it2.
@@ -1189,7 +1189,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
break;
}
- p.push_back(Inkscape::SnapCandidatePoint(curve_it1->finalPoint() * i2dt, sst, stt));
+ p.emplace_back(curve_it1->finalPoint() * i2dt, sst, stt);
}
}
@@ -1208,7 +1208,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:
if (!cs.empty()) { // There might be multiple intersections...
for (Geom::Crossings::const_iterator i = cs.begin(); i != cs.end(); ++i) {
Geom::Point p_ix = (*path_it).pointAt((*i).ta);
- p.push_back(Inkscape::SnapCandidatePoint(p_ix * i2dt, Inkscape::SNAPSOURCE_PATH_INTERSECTION, Inkscape::SNAPTARGET_PATH_INTERSECTION));
+ p.emplace_back(p_ix * i2dt, Inkscape::SNAPSOURCE_PATH_INTERSECTION, Inkscape::SNAPTARGET_PATH_INTERSECTION);
}
}
} catch (Geom::RangeError &e) {
diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp
index 442580888..e8109be0f 100644
--- a/src/object/sp-spiral.cpp
+++ b/src/object/sp-spiral.cpp
@@ -393,7 +393,7 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) {
Geom::Affine const i2dt (this->i2dt_affine ());
- p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(this->cx, this->cy) * i2dt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT));
+ p.emplace_back(Geom::Point(this->cx, this->cy) * i2dt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
// This point is the start-point of the spiral, which is also returned when _snap_to_itemnode has been set
// in the object snapper. In that case we will get a duplicate!
}
diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp
index 235fd32d8..dc8ce4d91 100644
--- a/src/object/sp-star.cpp
+++ b/src/object/sp-star.cpp
@@ -483,7 +483,7 @@ void SPStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) {
Geom::Affine const i2dt (this->i2dt_affine ());
- p.push_back(Inkscape::SnapCandidatePoint(this->center * i2dt,Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT));
+ p.emplace_back(this->center * i2dt,Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
}
}
diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp
index 245330720..f801e8df0 100644
--- a/src/object/sp-text.cpp
+++ b/src/object/sp-text.cpp
@@ -356,7 +356,7 @@ void SPText::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::
boost::optional<Geom::Point> pt = layout->baselineAnchorPoint();
if (pt) {
- p.push_back(Inkscape::SnapCandidatePoint((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR));
+ p.emplace_back((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR);
}
}
}
diff --git a/src/pure-transform.cpp b/src/pure-transform.cpp
index db4926258..290b85007 100644
--- a/src/pure-transform.cpp
+++ b/src/pure-transform.cpp
@@ -33,7 +33,7 @@ void PureTransform::snap(::SnapManager *sm, std::vector<Inkscape::SnapCandidateP
bbox.expandTo(transformed);
}
- transformed_points.push_back(Inkscape::SnapCandidatePoint(transformed, (*i).getSourceType(), source_num, Inkscape::SNAPTARGET_UNDEFINED, Geom::OptRect()));
+ transformed_points.emplace_back(transformed, (*i).getSourceType(), source_num, Inkscape::SNAPTARGET_UNDEFINED, Geom::OptRect());
source_num++;
}
diff --git a/src/removeoverlap.cpp b/src/removeoverlap.cpp
index bf9c362e2..a56933969 100644
--- a/src/removeoverlap.cpp
+++ b/src/removeoverlap.cpp
@@ -68,7 +68,7 @@ void removeoverlap(std::vector<SPItem*> const & items, double const xGap, double
min[Y] = max[Y] = (min[Y] + max[Y]) / 2.;
}
Rectangle * vspc_rect = new Rectangle(min[X], max[X], min[Y], max[Y]);
- records.push_back(Record(item, item_box->midpoint(), vspc_rect));
+ records.emplace_back(item, item_box->midpoint(), vspc_rect);
rs.push_back(vspc_rect);
}
}
diff --git a/src/resource-manager.cpp b/src/resource-manager.cpp
index fb23ffef0..6a455a8cc 100644
--- a/src/resource-manager.cpp
+++ b/src/resource-manager.cpp
@@ -227,18 +227,18 @@ std::vector<Glib::ustring> ResourceManagerImpl::findBrokenLinks( SPDocument *doc
if ( extractFilepath( href, uri ) ) {
if ( Glib::path_is_absolute(uri) ) {
if ( !Glib::file_test(uri, Glib::FILE_TEST_EXISTS) ) {
- result.push_back(href);
+ result.emplace_back(href);
uniques.insert(href);
}
} else {
std::string combined = Glib::build_filename(doc->getBase(), uri);
if ( !Glib::file_test(combined, Glib::FILE_TEST_EXISTS) ) {
- result.push_back(href);
+ result.emplace_back(href);
uniques.insert(href);
}
}
} else if ( reconstructFilepath( href, uri ) ) {
- result.push_back(href);
+ result.emplace_back(href);
uniques.insert(href);
}
}
diff --git a/src/satisfied-guide-cns.cpp b/src/satisfied-guide-cns.cpp
index b2f26761d..6fe272481 100644
--- a/src/satisfied-guide-cns.cpp
+++ b/src/satisfied-guide-cns.cpp
@@ -17,7 +17,7 @@ void satisfied_guide_cns(SPDesktop const &desktop,
SPGuide &g = *(*it);
for (unsigned int i = 0; i < snappoints.size(); ++i) {
if (Geom::are_near(g.getDistanceFrom(snappoints[i].getPoint()), 0, 1e-2)) {
- cns.push_back(SPGuideConstraint(&g, i));
+ cns.emplace_back(&g, i);
}
}
}
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 2108db35a..8c47d1934 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -3975,7 +3975,7 @@ void ObjectSet::setClipGroup()
|| apply_to_layer){
Inkscape::XML::Node *dup = (*i)->getRepr()->duplicate(xml_doc);
- mask_items.push_back(std::make_pair(dup, (*i)->i2doc_affine()));
+ mask_items.emplace_back(dup, (*i)->i2doc_affine());
if (remove_original) {
items_to_delete.push_back(*i);
diff --git a/src/selection.cpp b/src/selection.cpp
index 66c960953..142695855 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -131,7 +131,7 @@ std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferenc
//Include the transformation origin for snapping
//For a selection or group only the overall center is considered, not for each item individually
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER)) {
- p.push_back(Inkscape::SnapCandidatePoint(this_item->getCenter(), SNAPSOURCE_ROTATION_CENTER));
+ p.emplace_back(this_item->getCenter(), SNAPSOURCE_ROTATION_CENTER);
}
}
}
@@ -211,7 +211,7 @@ Selection::setBackup ()
selected_id += "--id=";
selected_id += item->getId();
params.push_back(selected_id);
- _selected_ids.push_back(item->getId());
+ _selected_ids.emplace_back(item->getId());
}
if(tool){
Inkscape::UI::ControlPointSelection *cps = tool->_selected_nodes;
@@ -242,7 +242,7 @@ Selection::setBackup ()
Glib::ustring selected_nodes = ss.str();
if(found_nl && found_sp) {
- _seldata.push_back(std::make_pair(id,std::make_pair(sp,nl)));
+ _seldata.emplace_back(id,std::make_pair(sp,nl));
params.push_back(selected_nodes);
} else {
g_warning("Something went wrong while trying to pass selected nodes to extension. Please report a bug.");
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 5c7482530..837f0da0e 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1298,8 +1298,8 @@ gboolean Inkscape::SelTrans::centerRequest(Geom::Point &pt, guint state)
if (state & GDK_CONTROL_MASK) { // with Ctrl, constrain to axes
std::vector<Inkscape::Snapper::SnapConstraint> constraints;
- constraints.push_back(Inkscape::Snapper::SnapConstraint(_point, Geom::Point(1, 0)));
- constraints.push_back(Inkscape::Snapper::SnapConstraint(_point, Geom::Point(0, 1)));
+ constraints.emplace_back(_point, Geom::Point(1, 0));
+ constraints.emplace_back(_point, Geom::Point(0, 1));
Inkscape::SnappedPoint sp = m.multipleConstrainedSnaps(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ROTATION_CENTER), constraints, state & GDK_SHIFT_MASK);
pt = sp.getPoint();
}
diff --git a/src/snap-candidate.h b/src/snap-candidate.h
index abecb6280..41d40ee56 100644
--- a/src/snap-candidate.h
+++ b/src/snap-candidate.h
@@ -72,8 +72,8 @@ public:
void setDistance(Geom::Coord dist) {_dist = dist;}
Geom::Coord getDistance() { return _dist;}
- void addOrigin(Geom::Point pt) { _origins_and_vectors.push_back(std::make_pair(pt, false)); }
- void addVector(Geom::Point v) { _origins_and_vectors.push_back(std::make_pair(v, true)); }
+ void addOrigin(Geom::Point pt) { _origins_and_vectors.emplace_back(pt, false); }
+ void addVector(Geom::Point v) { _origins_and_vectors.emplace_back(v, true); }
std::vector<std::pair<Geom::Point, bool> > const & getOriginsAndVectors() const {return _origins_and_vectors;}
bool operator <(const SnapCandidatePoint &other) const { return _dist < other._dist; } // Needed for sorting the SnapCandidatePoints
diff --git a/src/snap.cpp b/src/snap.cpp
index 4ea761fe3..abe57998d 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -373,8 +373,8 @@ Inkscape::SnappedPoint SnapManager::constrainedAngularSnap(Inkscape::SnapCandida
// Now do the snapping...
std::vector<Inkscape::Snapper::SnapConstraint> constraints;
- constraints.push_back(Inkscape::Snapper::SnapConstraint(Geom::Line(o, angle_ceil - M_PI/2)));
- constraints.push_back(Inkscape::Snapper::SnapConstraint(Geom::Line(o, angle_floor - M_PI/2)));
+ constraints.emplace_back(Geom::Line(o, angle_ceil - M_PI/2));
+ constraints.emplace_back(Geom::Line(o, angle_floor - M_PI/2));
sp = multipleConstrainedSnaps(p, constraints); // Constraints will always be applied, even if we didn't snap
if (!sp.getSnapped()) { // If we haven't snapped then we only had the constraint applied;
sp.setTarget(Inkscape::SNAPTARGET_CONSTRAINED_ANGLE);
@@ -530,19 +530,19 @@ Inkscape::SnappedPoint SnapManager::findBestSnap(Inkscape::SnapCandidatePoint co
// Therefore we explicitly check whether the paths should be considered as snap targets themselves
bool exclude_paths = !snapprefs.isTargetSnappable(Inkscape::SNAPTARGET_PATH);
if (getClosestCurve(isr.curves, closestCurve, exclude_paths)) {
- sp_list.push_back(Inkscape::SnappedPoint(closestCurve));
+ sp_list.emplace_back(closestCurve);
}
// search for the closest snapped grid line
Inkscape::SnappedLine closestGridLine;
if (getClosestSL(isr.grid_lines, closestGridLine)) {
- sp_list.push_back(Inkscape::SnappedPoint(closestGridLine));
+ sp_list.emplace_back(closestGridLine);
}
// search for the closest snapped guide line
Inkscape::SnappedLine closestGuideLine;
if (getClosestSL(isr.guide_lines, closestGuideLine)) {
- sp_list.push_back(Inkscape::SnappedPoint(closestGuideLine));
+ sp_list.emplace_back(closestGuideLine);
}
// When freely snapping to a grid/guide/path, only one degree of freedom is eliminated
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 500da4147..66f9be7a1 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -177,14 +177,14 @@ ClipboardManagerImpl::ClipboardManagerImpl()
// Presenting "image/x-emf" as CF_ENHMETAFILE must be done by Inkscape ?
// push supported clipboard targets, in order of preference
- _preferred_targets.push_back("image/x-inkscape-svg");
- _preferred_targets.push_back("image/svg+xml");
- _preferred_targets.push_back("image/svg+xml-compressed");
- _preferred_targets.push_back("image/x-emf");
- _preferred_targets.push_back("CF_ENHMETAFILE");
- _preferred_targets.push_back("WCF_ENHMETAFILE"); // seen on Wine
- _preferred_targets.push_back("application/pdf");
- _preferred_targets.push_back("image/x-adobe-illustrator");
+ _preferred_targets.emplace_back("image/x-inkscape-svg");
+ _preferred_targets.emplace_back("image/svg+xml");
+ _preferred_targets.emplace_back("image/svg+xml-compressed");
+ _preferred_targets.emplace_back("image/x-emf");
+ _preferred_targets.emplace_back("CF_ENHMETAFILE");
+ _preferred_targets.emplace_back("WCF_ENHMETAFILE"); // seen on Wine
+ _preferred_targets.emplace_back("application/pdf");
+ _preferred_targets.emplace_back("image/x-adobe-illustrator");
}
@@ -695,7 +695,7 @@ std::vector<Glib::ustring> ClipboardManagerImpl::getElementsOfType(SPDesktop *de
}
for (auto i=reprs.begin();i!=reprs.end();++i) {
Inkscape::XML::Node const * node = *i;
- result.push_back(node->attribute("id"));
+ result.emplace_back(node->attribute("id"));
}
if ( result.empty() ) {
_userWarn(desktop, ((Glib::ustring)_("Clipboard does not contain any.") + (Glib::ustring)type).c_str());
@@ -1446,17 +1446,17 @@ void ClipboardManagerImpl::_setClipboardTargets()
Glib::ustring mime = (*out)->get_mimetype();
if (mime != CLIPBOARD_TEXT_TARGET) {
if ( !plaintextSet && (mime.find("svg") == Glib::ustring::npos) ) {
- target_list.push_back(Gtk::TargetEntry(CLIPBOARD_TEXT_TARGET));
+ target_list.emplace_back(CLIPBOARD_TEXT_TARGET);
plaintextSet = true;
}
- target_list.push_back(Gtk::TargetEntry(mime));
+ target_list.emplace_back(mime);
}
}
}
// Add PNG export explicitly since there is no extension for this...
// On Windows, GTK will also present this as a CF_DIB/CF_BITMAP
- target_list.push_back(Gtk::TargetEntry( "image/png" ));
+ target_list.emplace_back( "image/png" );
_clipboard->set(target_list,
sigc::mem_fun(*this, &ClipboardManagerImpl::_onGet),
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index fb2b86b68..6cee2e10e 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -163,7 +163,7 @@ void AboutBox::initStrings() {
std::string author_line;
while (std::getline(authors_filestream, author_line)) {
- authors.push_back(author_line);
+ authors.emplace_back(author_line);
}
}
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 8e6b5e0e5..3d9a53951 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -311,7 +311,7 @@ private :
SPItem *item = *it;
Geom::OptRect bbox = !prefs_bbox ? (item)->desktopVisualBounds() : (item)->desktopGeometricBounds();
if (bbox) {
- sorted.push_back(BBoxSort(item, *bbox, _orientation, _kBegin, _kEnd));
+ sorted.emplace_back(item, *bbox, _orientation, _kBegin, _kEnd);
}
}
//sort bbox by anchors
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 72cca76d3..4d3a1fb62 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -915,7 +915,7 @@ std::vector<Glib::ustring> FileOpenDialogImplGtk::getFilenames()
std::vector<Glib::ustring> result;
for (auto it : result_tmp)
- result.push_back(it);
+ result.emplace_back(it);
if (result.empty()) {
result = get_uris();
@@ -1067,7 +1067,7 @@ void FileSaveDialogImplGtk::fileNameEntryChangedCallback()
// try appending to the current path
// not this way: fileName = get_current_folder() + "/" + fileName;
std::vector<Glib::ustring> pathSegments;
- pathSegments.push_back(get_current_folder());
+ pathSegments.emplace_back(get_current_folder());
pathSegments.push_back(fileName);
fileName = Glib::build_filename(pathSegments);
}
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 20ce89115..80bda9138 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -2233,9 +2233,9 @@ bool FilterEffectsDialog::PrimitiveList::do_connection_node(const Gtk::TreeIter&
const int con_w = (int)(fheight * 0.35f);
const int con_y = (int)(rct.get_y() + (h / 2) - con_w + (input * h));
points.clear();
- points.push_back(Gdk::Point(x, con_y));
- points.push_back(Gdk::Point(x, con_y + con_w * 2));
- points.push_back(Gdk::Point(x - con_w, con_y + con_w));
+ points.emplace_back(x, con_y);
+ points.emplace_back(x, con_y + con_w * 2);
+ points.emplace_back(x - con_w, con_y + con_w);
return ix >= x - h && iy >= con_y && ix <= x && iy <= points[1].get_y();
}
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index d9a43d21b..64045f252 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -502,8 +502,8 @@ bool Find::item_font_match(SPItem *item, const gchar *text, bool exact, bool cas
}
std::vector<Glib::ustring> vFontTokenNames;
- vFontTokenNames.push_back("font-family:");
- vFontTokenNames.push_back("-inkscape-font-specification:");
+ vFontTokenNames.emplace_back("font-family:");
+ vFontTokenNames.emplace_back("-inkscape-font-specification:");
std::vector<Glib::ustring> vStyleTokens = Glib::Regex::split_simple(";", item_style);
for(size_t i=0; i<vStyleTokens.size(); i++) {
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index 4737913f6..a41eb41e5 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -142,157 +142,157 @@ static std::vector<NamedRange> & getRanges()
static std::vector<NamedRange> ranges;
if (!init) {
init = true;
- ranges.push_back(std::make_pair(std::make_pair(0x0000, 0xFFFD), _("all")));
- ranges.push_back(std::make_pair(std::make_pair(0x0000, 0x007F), _("Basic Latin")));
- ranges.push_back(std::make_pair(std::make_pair(0x0080, 0x00FF), _("Latin-1 Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x0100, 0x017F), _("Latin Extended-A")));
- ranges.push_back(std::make_pair(std::make_pair(0x0180, 0x024F), _("Latin Extended-B")));
- ranges.push_back(std::make_pair(std::make_pair(0x0250, 0x02AF), _("IPA Extensions")));
- ranges.push_back(std::make_pair(std::make_pair(0x02B0, 0x02FF), _("Spacing Modifier Letters")));
- ranges.push_back(std::make_pair(std::make_pair(0x0300, 0x036F), _("Combining Diacritical Marks")));
- ranges.push_back(std::make_pair(std::make_pair(0x0370, 0x03FF), _("Greek and Coptic")));
- ranges.push_back(std::make_pair(std::make_pair(0x0400, 0x04FF), _("Cyrillic")));
- ranges.push_back(std::make_pair(std::make_pair(0x0500, 0x052F), _("Cyrillic Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x0530, 0x058F), _("Armenian")));
- ranges.push_back(std::make_pair(std::make_pair(0x0590, 0x05FF), _("Hebrew")));
- ranges.push_back(std::make_pair(std::make_pair(0x0600, 0x06FF), _("Arabic")));
- ranges.push_back(std::make_pair(std::make_pair(0x0700, 0x074F), _("Syriac")));
- ranges.push_back(std::make_pair(std::make_pair(0x0750, 0x077F), _("Arabic Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x0780, 0x07BF), _("Thaana")));
- ranges.push_back(std::make_pair(std::make_pair(0x07C0, 0x07FF), _("NKo")));
- ranges.push_back(std::make_pair(std::make_pair(0x0800, 0x083F), _("Samaritan")));
- ranges.push_back(std::make_pair(std::make_pair(0x0900, 0x097F), _("Devanagari")));
- ranges.push_back(std::make_pair(std::make_pair(0x0980, 0x09FF), _("Bengali")));
- ranges.push_back(std::make_pair(std::make_pair(0x0A00, 0x0A7F), _("Gurmukhi")));
- ranges.push_back(std::make_pair(std::make_pair(0x0A80, 0x0AFF), _("Gujarati")));
- ranges.push_back(std::make_pair(std::make_pair(0x0B00, 0x0B7F), _("Oriya")));
- ranges.push_back(std::make_pair(std::make_pair(0x0B80, 0x0BFF), _("Tamil")));
- ranges.push_back(std::make_pair(std::make_pair(0x0C00, 0x0C7F), _("Telugu")));
- ranges.push_back(std::make_pair(std::make_pair(0x0C80, 0x0CFF), _("Kannada")));
- ranges.push_back(std::make_pair(std::make_pair(0x0D00, 0x0D7F), _("Malayalam")));
- ranges.push_back(std::make_pair(std::make_pair(0x0D80, 0x0DFF), _("Sinhala")));
- ranges.push_back(std::make_pair(std::make_pair(0x0E00, 0x0E7F), _("Thai")));
- ranges.push_back(std::make_pair(std::make_pair(0x0E80, 0x0EFF), _("Lao")));
- ranges.push_back(std::make_pair(std::make_pair(0x0F00, 0x0FFF), _("Tibetan")));
- ranges.push_back(std::make_pair(std::make_pair(0x1000, 0x109F), _("Myanmar")));
- ranges.push_back(std::make_pair(std::make_pair(0x10A0, 0x10FF), _("Georgian")));
- ranges.push_back(std::make_pair(std::make_pair(0x1100, 0x11FF), _("Hangul Jamo")));
- ranges.push_back(std::make_pair(std::make_pair(0x1200, 0x137F), _("Ethiopic")));
- ranges.push_back(std::make_pair(std::make_pair(0x1380, 0x139F), _("Ethiopic Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x13A0, 0x13FF), _("Cherokee")));
- ranges.push_back(std::make_pair(std::make_pair(0x1400, 0x167F), _("Unified Canadian Aboriginal Syllabics")));
- ranges.push_back(std::make_pair(std::make_pair(0x1680, 0x169F), _("Ogham")));
- ranges.push_back(std::make_pair(std::make_pair(0x16A0, 0x16FF), _("Runic")));
- ranges.push_back(std::make_pair(std::make_pair(0x1700, 0x171F), _("Tagalog")));
- ranges.push_back(std::make_pair(std::make_pair(0x1720, 0x173F), _("Hanunoo")));
- ranges.push_back(std::make_pair(std::make_pair(0x1740, 0x175F), _("Buhid")));
- ranges.push_back(std::make_pair(std::make_pair(0x1760, 0x177F), _("Tagbanwa")));
- ranges.push_back(std::make_pair(std::make_pair(0x1780, 0x17FF), _("Khmer")));
- ranges.push_back(std::make_pair(std::make_pair(0x1800, 0x18AF), _("Mongolian")));
- ranges.push_back(std::make_pair(std::make_pair(0x18B0, 0x18FF), _("Unified Canadian Aboriginal Syllabics Extended")));
- ranges.push_back(std::make_pair(std::make_pair(0x1900, 0x194F), _("Limbu")));
- ranges.push_back(std::make_pair(std::make_pair(0x1950, 0x197F), _("Tai Le")));
- ranges.push_back(std::make_pair(std::make_pair(0x1980, 0x19DF), _("New Tai Lue")));
- ranges.push_back(std::make_pair(std::make_pair(0x19E0, 0x19FF), _("Khmer Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x1A00, 0x1A1F), _("Buginese")));
- ranges.push_back(std::make_pair(std::make_pair(0x1A20, 0x1AAF), _("Tai Tham")));
- ranges.push_back(std::make_pair(std::make_pair(0x1B00, 0x1B7F), _("Balinese")));
- ranges.push_back(std::make_pair(std::make_pair(0x1B80, 0x1BBF), _("Sundanese")));
- ranges.push_back(std::make_pair(std::make_pair(0x1C00, 0x1C4F), _("Lepcha")));
- ranges.push_back(std::make_pair(std::make_pair(0x1C50, 0x1C7F), _("Ol Chiki")));
- ranges.push_back(std::make_pair(std::make_pair(0x1CD0, 0x1CFF), _("Vedic Extensions")));
- ranges.push_back(std::make_pair(std::make_pair(0x1D00, 0x1D7F), _("Phonetic Extensions")));
- ranges.push_back(std::make_pair(std::make_pair(0x1D80, 0x1DBF), _("Phonetic Extensions Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x1DC0, 0x1DFF), _("Combining Diacritical Marks Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x1E00, 0x1EFF), _("Latin Extended Additional")));
- ranges.push_back(std::make_pair(std::make_pair(0x1F00, 0x1FFF), _("Greek Extended")));
- ranges.push_back(std::make_pair(std::make_pair(0x2000, 0x206F), _("General Punctuation")));
- ranges.push_back(std::make_pair(std::make_pair(0x2070, 0x209F), _("Superscripts and Subscripts")));
- ranges.push_back(std::make_pair(std::make_pair(0x20A0, 0x20CF), _("Currency Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x20D0, 0x20FF), _("Combining Diacritical Marks for Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x2100, 0x214F), _("Letterlike Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x2150, 0x218F), _("Number Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0x2190, 0x21FF), _("Arrows")));
- ranges.push_back(std::make_pair(std::make_pair(0x2200, 0x22FF), _("Mathematical Operators")));
- ranges.push_back(std::make_pair(std::make_pair(0x2300, 0x23FF), _("Miscellaneous Technical")));
- ranges.push_back(std::make_pair(std::make_pair(0x2400, 0x243F), _("Control Pictures")));
- ranges.push_back(std::make_pair(std::make_pair(0x2440, 0x245F), _("Optical Character Recognition")));
- ranges.push_back(std::make_pair(std::make_pair(0x2460, 0x24FF), _("Enclosed Alphanumerics")));
- ranges.push_back(std::make_pair(std::make_pair(0x2500, 0x257F), _("Box Drawing")));
- ranges.push_back(std::make_pair(std::make_pair(0x2580, 0x259F), _("Block Elements")));
- ranges.push_back(std::make_pair(std::make_pair(0x25A0, 0x25FF), _("Geometric Shapes")));
- ranges.push_back(std::make_pair(std::make_pair(0x2600, 0x26FF), _("Miscellaneous Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x2700, 0x27BF), _("Dingbats")));
- ranges.push_back(std::make_pair(std::make_pair(0x27C0, 0x27EF), _("Miscellaneous Mathematical Symbols-A")));
- ranges.push_back(std::make_pair(std::make_pair(0x27F0, 0x27FF), _("Supplemental Arrows-A")));
- ranges.push_back(std::make_pair(std::make_pair(0x2800, 0x28FF), _("Braille Patterns")));
- ranges.push_back(std::make_pair(std::make_pair(0x2900, 0x297F), _("Supplemental Arrows-B")));
- ranges.push_back(std::make_pair(std::make_pair(0x2980, 0x29FF), _("Miscellaneous Mathematical Symbols-B")));
- ranges.push_back(std::make_pair(std::make_pair(0x2A00, 0x2AFF), _("Supplemental Mathematical Operators")));
- ranges.push_back(std::make_pair(std::make_pair(0x2B00, 0x2BFF), _("Miscellaneous Symbols and Arrows")));
- ranges.push_back(std::make_pair(std::make_pair(0x2C00, 0x2C5F), _("Glagolitic")));
- ranges.push_back(std::make_pair(std::make_pair(0x2C60, 0x2C7F), _("Latin Extended-C")));
- ranges.push_back(std::make_pair(std::make_pair(0x2C80, 0x2CFF), _("Coptic")));
- ranges.push_back(std::make_pair(std::make_pair(0x2D00, 0x2D2F), _("Georgian Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x2D30, 0x2D7F), _("Tifinagh")));
- ranges.push_back(std::make_pair(std::make_pair(0x2D80, 0x2DDF), _("Ethiopic Extended")));
- ranges.push_back(std::make_pair(std::make_pair(0x2DE0, 0x2DFF), _("Cyrillic Extended-A")));
- ranges.push_back(std::make_pair(std::make_pair(0x2E00, 0x2E7F), _("Supplemental Punctuation")));
- ranges.push_back(std::make_pair(std::make_pair(0x2E80, 0x2EFF), _("CJK Radicals Supplement")));
- ranges.push_back(std::make_pair(std::make_pair(0x2F00, 0x2FDF), _("Kangxi Radicals")));
- ranges.push_back(std::make_pair(std::make_pair(0x2FF0, 0x2FFF), _("Ideographic Description Characters")));
- ranges.push_back(std::make_pair(std::make_pair(0x3000, 0x303F), _("CJK Symbols and Punctuation")));
- ranges.push_back(std::make_pair(std::make_pair(0x3040, 0x309F), _("Hiragana")));
- ranges.push_back(std::make_pair(std::make_pair(0x30A0, 0x30FF), _("Katakana")));
- ranges.push_back(std::make_pair(std::make_pair(0x3100, 0x312F), _("Bopomofo")));
- ranges.push_back(std::make_pair(std::make_pair(0x3130, 0x318F), _("Hangul Compatibility Jamo")));
- ranges.push_back(std::make_pair(std::make_pair(0x3190, 0x319F), _("Kanbun")));
- ranges.push_back(std::make_pair(std::make_pair(0x31A0, 0x31BF), _("Bopomofo Extended")));
- ranges.push_back(std::make_pair(std::make_pair(0x31C0, 0x31EF), _("CJK Strokes")));
- ranges.push_back(std::make_pair(std::make_pair(0x31F0, 0x31FF), _("Katakana Phonetic Extensions")));
- ranges.push_back(std::make_pair(std::make_pair(0x3200, 0x32FF), _("Enclosed CJK Letters and Months")));
- ranges.push_back(std::make_pair(std::make_pair(0x3300, 0x33FF), _("CJK Compatibility")));
- ranges.push_back(std::make_pair(std::make_pair(0x3400, 0x4DBF), _("CJK Unified Ideographs Extension A")));
- ranges.push_back(std::make_pair(std::make_pair(0x4DC0, 0x4DFF), _("Yijing Hexagram Symbols")));
- ranges.push_back(std::make_pair(std::make_pair(0x4E00, 0x9FFF), _("CJK Unified Ideographs")));
- ranges.push_back(std::make_pair(std::make_pair(0xA000, 0xA48F), _("Yi Syllables")));
- ranges.push_back(std::make_pair(std::make_pair(0xA490, 0xA4CF), _("Yi Radicals")));
- ranges.push_back(std::make_pair(std::make_pair(0xA4D0, 0xA4FF), _("Lisu")));
- ranges.push_back(std::make_pair(std::make_pair(0xA500, 0xA63F), _("Vai")));
- ranges.push_back(std::make_pair(std::make_pair(0xA640, 0xA69F), _("Cyrillic Extended-B")));
- ranges.push_back(std::make_pair(std::make_pair(0xA6A0, 0xA6FF), _("Bamum")));
- ranges.push_back(std::make_pair(std::make_pair(0xA700, 0xA71F), _("Modifier Tone Letters")));
- ranges.push_back(std::make_pair(std::make_pair(0xA720, 0xA7FF), _("Latin Extended-D")));
- ranges.push_back(std::make_pair(std::make_pair(0xA800, 0xA82F), _("Syloti Nagri")));
- ranges.push_back(std::make_pair(std::make_pair(0xA830, 0xA83F), _("Common Indic Number Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0xA840, 0xA87F), _("Phags-pa")));
- ranges.push_back(std::make_pair(std::make_pair(0xA880, 0xA8DF), _("Saurashtra")));
- ranges.push_back(std::make_pair(std::make_pair(0xA8E0, 0xA8FF), _("Devanagari Extended")));
- ranges.push_back(std::make_pair(std::make_pair(0xA900, 0xA92F), _("Kayah Li")));
- ranges.push_back(std::make_pair(std::make_pair(0xA930, 0xA95F), _("Rejang")));
- ranges.push_back(std::make_pair(std::make_pair(0xA960, 0xA97F), _("Hangul Jamo Extended-A")));
- ranges.push_back(std::make_pair(std::make_pair(0xA980, 0xA9DF), _("Javanese")));
- ranges.push_back(std::make_pair(std::make_pair(0xAA00, 0xAA5F), _("Cham")));
- ranges.push_back(std::make_pair(std::make_pair(0xAA60, 0xAA7F), _("Myanmar Extended-A")));
- ranges.push_back(std::make_pair(std::make_pair(0xAA80, 0xAADF), _("Tai Viet")));
- ranges.push_back(std::make_pair(std::make_pair(0xABC0, 0xABFF), _("Meetei Mayek")));
- ranges.push_back(std::make_pair(std::make_pair(0xAC00, 0xD7AF), _("Hangul Syllables")));
- ranges.push_back(std::make_pair(std::make_pair(0xD7B0, 0xD7FF), _("Hangul Jamo Extended-B")));
- ranges.push_back(std::make_pair(std::make_pair(0xD800, 0xDB7F), _("High Surrogates")));
- ranges.push_back(std::make_pair(std::make_pair(0xDB80, 0xDBFF), _("High Private Use Surrogates")));
- ranges.push_back(std::make_pair(std::make_pair(0xDC00, 0xDFFF), _("Low Surrogates")));
- ranges.push_back(std::make_pair(std::make_pair(0xE000, 0xF8FF), _("Private Use Area")));
- ranges.push_back(std::make_pair(std::make_pair(0xF900, 0xFAFF), _("CJK Compatibility Ideographs")));
- ranges.push_back(std::make_pair(std::make_pair(0xFB00, 0xFB4F), _("Alphabetic Presentation Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0xFB50, 0xFDFF), _("Arabic Presentation Forms-A")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE00, 0xFE0F), _("Variation Selectors")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE10, 0xFE1F), _("Vertical Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE20, 0xFE2F), _("Combining Half Marks")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE30, 0xFE4F), _("CJK Compatibility Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE50, 0xFE6F), _("Small Form Variants")));
- ranges.push_back(std::make_pair(std::make_pair(0xFE70, 0xFEFF), _("Arabic Presentation Forms-B")));
- ranges.push_back(std::make_pair(std::make_pair(0xFF00, 0xFFEF), _("Halfwidth and Fullwidth Forms")));
- ranges.push_back(std::make_pair(std::make_pair(0xFFF0, 0xFFFF), _("Specials")));
+ ranges.emplace_back(std::make_pair(0x0000, 0xFFFD), _("all"));
+ ranges.emplace_back(std::make_pair(0x0000, 0x007F), _("Basic Latin"));
+ ranges.emplace_back(std::make_pair(0x0080, 0x00FF), _("Latin-1 Supplement"));
+ ranges.emplace_back(std::make_pair(0x0100, 0x017F), _("Latin Extended-A"));
+ ranges.emplace_back(std::make_pair(0x0180, 0x024F), _("Latin Extended-B"));
+ ranges.emplace_back(std::make_pair(0x0250, 0x02AF), _("IPA Extensions"));
+ ranges.emplace_back(std::make_pair(0x02B0, 0x02FF), _("Spacing Modifier Letters"));
+ ranges.emplace_back(std::make_pair(0x0300, 0x036F), _("Combining Diacritical Marks"));
+ ranges.emplace_back(std::make_pair(0x0370, 0x03FF), _("Greek and Coptic"));
+ ranges.emplace_back(std::make_pair(0x0400, 0x04FF), _("Cyrillic"));
+ ranges.emplace_back(std::make_pair(0x0500, 0x052F), _("Cyrillic Supplement"));
+ ranges.emplace_back(std::make_pair(0x0530, 0x058F), _("Armenian"));
+ ranges.emplace_back(std::make_pair(0x0590, 0x05FF), _("Hebrew"));
+ ranges.emplace_back(std::make_pair(0x0600, 0x06FF), _("Arabic"));
+ ranges.emplace_back(std::make_pair(0x0700, 0x074F), _("Syriac"));
+ ranges.emplace_back(std::make_pair(0x0750, 0x077F), _("Arabic Supplement"));
+ ranges.emplace_back(std::make_pair(0x0780, 0x07BF), _("Thaana"));
+ ranges.emplace_back(std::make_pair(0x07C0, 0x07FF), _("NKo"));
+ ranges.emplace_back(std::make_pair(0x0800, 0x083F), _("Samaritan"));
+ ranges.emplace_back(std::make_pair(0x0900, 0x097F), _("Devanagari"));
+ ranges.emplace_back(std::make_pair(0x0980, 0x09FF), _("Bengali"));
+ ranges.emplace_back(std::make_pair(0x0A00, 0x0A7F), _("Gurmukhi"));
+ ranges.emplace_back(std::make_pair(0x0A80, 0x0AFF), _("Gujarati"));
+ ranges.emplace_back(std::make_pair(0x0B00, 0x0B7F), _("Oriya"));
+ ranges.emplace_back(std::make_pair(0x0B80, 0x0BFF), _("Tamil"));
+ ranges.emplace_back(std::make_pair(0x0C00, 0x0C7F), _("Telugu"));
+ ranges.emplace_back(std::make_pair(0x0C80, 0x0CFF), _("Kannada"));
+ ranges.emplace_back(std::make_pair(0x0D00, 0x0D7F), _("Malayalam"));
+ ranges.emplace_back(std::make_pair(0x0D80, 0x0DFF), _("Sinhala"));
+ ranges.emplace_back(std::make_pair(0x0E00, 0x0E7F), _("Thai"));
+ ranges.emplace_back(std::make_pair(0x0E80, 0x0EFF), _("Lao"));
+ ranges.emplace_back(std::make_pair(0x0F00, 0x0FFF), _("Tibetan"));
+ ranges.emplace_back(std::make_pair(0x1000, 0x109F), _("Myanmar"));
+ ranges.emplace_back(std::make_pair(0x10A0, 0x10FF), _("Georgian"));
+ ranges.emplace_back(std::make_pair(0x1100, 0x11FF), _("Hangul Jamo"));
+ ranges.emplace_back(std::make_pair(0x1200, 0x137F), _("Ethiopic"));
+ ranges.emplace_back(std::make_pair(0x1380, 0x139F), _("Ethiopic Supplement"));
+ ranges.emplace_back(std::make_pair(0x13A0, 0x13FF), _("Cherokee"));
+ ranges.emplace_back(std::make_pair(0x1400, 0x167F), _("Unified Canadian Aboriginal Syllabics"));
+ ranges.emplace_back(std::make_pair(0x1680, 0x169F), _("Ogham"));
+ ranges.emplace_back(std::make_pair(0x16A0, 0x16FF), _("Runic"));
+ ranges.emplace_back(std::make_pair(0x1700, 0x171F), _("Tagalog"));
+ ranges.emplace_back(std::make_pair(0x1720, 0x173F), _("Hanunoo"));
+ ranges.emplace_back(std::make_pair(0x1740, 0x175F), _("Buhid"));
+ ranges.emplace_back(std::make_pair(0x1760, 0x177F), _("Tagbanwa"));
+ ranges.emplace_back(std::make_pair(0x1780, 0x17FF), _("Khmer"));
+ ranges.emplace_back(std::make_pair(0x1800, 0x18AF), _("Mongolian"));
+ ranges.emplace_back(std::make_pair(0x18B0, 0x18FF), _("Unified Canadian Aboriginal Syllabics Extended"));
+ ranges.emplace_back(std::make_pair(0x1900, 0x194F), _("Limbu"));
+ ranges.emplace_back(std::make_pair(0x1950, 0x197F), _("Tai Le"));
+ ranges.emplace_back(std::make_pair(0x1980, 0x19DF), _("New Tai Lue"));
+ ranges.emplace_back(std::make_pair(0x19E0, 0x19FF), _("Khmer Symbols"));
+ ranges.emplace_back(std::make_pair(0x1A00, 0x1A1F), _("Buginese"));
+ ranges.emplace_back(std::make_pair(0x1A20, 0x1AAF), _("Tai Tham"));
+ ranges.emplace_back(std::make_pair(0x1B00, 0x1B7F), _("Balinese"));
+ ranges.emplace_back(std::make_pair(0x1B80, 0x1BBF), _("Sundanese"));
+ ranges.emplace_back(std::make_pair(0x1C00, 0x1C4F), _("Lepcha"));
+ ranges.emplace_back(std::make_pair(0x1C50, 0x1C7F), _("Ol Chiki"));
+ ranges.emplace_back(std::make_pair(0x1CD0, 0x1CFF), _("Vedic Extensions"));
+ ranges.emplace_back(std::make_pair(0x1D00, 0x1D7F), _("Phonetic Extensions"));
+ ranges.emplace_back(std::make_pair(0x1D80, 0x1DBF), _("Phonetic Extensions Supplement"));
+ ranges.emplace_back(std::make_pair(0x1DC0, 0x1DFF), _("Combining Diacritical Marks Supplement"));
+ ranges.emplace_back(std::make_pair(0x1E00, 0x1EFF), _("Latin Extended Additional"));
+ ranges.emplace_back(std::make_pair(0x1F00, 0x1FFF), _("Greek Extended"));
+ ranges.emplace_back(std::make_pair(0x2000, 0x206F), _("General Punctuation"));
+ ranges.emplace_back(std::make_pair(0x2070, 0x209F), _("Superscripts and Subscripts"));
+ ranges.emplace_back(std::make_pair(0x20A0, 0x20CF), _("Currency Symbols"));
+ ranges.emplace_back(std::make_pair(0x20D0, 0x20FF), _("Combining Diacritical Marks for Symbols"));
+ ranges.emplace_back(std::make_pair(0x2100, 0x214F), _("Letterlike Symbols"));
+ ranges.emplace_back(std::make_pair(0x2150, 0x218F), _("Number Forms"));
+ ranges.emplace_back(std::make_pair(0x2190, 0x21FF), _("Arrows"));
+ ranges.emplace_back(std::make_pair(0x2200, 0x22FF), _("Mathematical Operators"));
+ ranges.emplace_back(std::make_pair(0x2300, 0x23FF), _("Miscellaneous Technical"));
+ ranges.emplace_back(std::make_pair(0x2400, 0x243F), _("Control Pictures"));
+ ranges.emplace_back(std::make_pair(0x2440, 0x245F), _("Optical Character Recognition"));
+ ranges.emplace_back(std::make_pair(0x2460, 0x24FF), _("Enclosed Alphanumerics"));
+ ranges.emplace_back(std::make_pair(0x2500, 0x257F), _("Box Drawing"));
+ ranges.emplace_back(std::make_pair(0x2580, 0x259F), _("Block Elements"));
+ ranges.emplace_back(std::make_pair(0x25A0, 0x25FF), _("Geometric Shapes"));
+ ranges.emplace_back(std::make_pair(0x2600, 0x26FF), _("Miscellaneous Symbols"));
+ ranges.emplace_back(std::make_pair(0x2700, 0x27BF), _("Dingbats"));
+ ranges.emplace_back(std::make_pair(0x27C0, 0x27EF), _("Miscellaneous Mathematical Symbols-A"));
+ ranges.emplace_back(std::make_pair(0x27F0, 0x27FF), _("Supplemental Arrows-A"));
+ ranges.emplace_back(std::make_pair(0x2800, 0x28FF), _("Braille Patterns"));
+ ranges.emplace_back(std::make_pair(0x2900, 0x297F), _("Supplemental Arrows-B"));
+ ranges.emplace_back(std::make_pair(0x2980, 0x29FF), _("Miscellaneous Mathematical Symbols-B"));
+ ranges.emplace_back(std::make_pair(0x2A00, 0x2AFF), _("Supplemental Mathematical Operators"));
+ ranges.emplace_back(std::make_pair(0x2B00, 0x2BFF), _("Miscellaneous Symbols and Arrows"));
+ ranges.emplace_back(std::make_pair(0x2C00, 0x2C5F), _("Glagolitic"));
+ ranges.emplace_back(std::make_pair(0x2C60, 0x2C7F), _("Latin Extended-C"));
+ ranges.emplace_back(std::make_pair(0x2C80, 0x2CFF), _("Coptic"));
+ ranges.emplace_back(std::make_pair(0x2D00, 0x2D2F), _("Georgian Supplement"));
+ ranges.emplace_back(std::make_pair(0x2D30, 0x2D7F), _("Tifinagh"));
+ ranges.emplace_back(std::make_pair(0x2D80, 0x2DDF), _("Ethiopic Extended"));
+ ranges.emplace_back(std::make_pair(0x2DE0, 0x2DFF), _("Cyrillic Extended-A"));
+ ranges.emplace_back(std::make_pair(0x2E00, 0x2E7F), _("Supplemental Punctuation"));
+ ranges.emplace_back(std::make_pair(0x2E80, 0x2EFF), _("CJK Radicals Supplement"));
+ ranges.emplace_back(std::make_pair(0x2F00, 0x2FDF), _("Kangxi Radicals"));
+ ranges.emplace_back(std::make_pair(0x2FF0, 0x2FFF), _("Ideographic Description Characters"));
+ ranges.emplace_back(std::make_pair(0x3000, 0x303F), _("CJK Symbols and Punctuation"));
+ ranges.emplace_back(std::make_pair(0x3040, 0x309F), _("Hiragana"));
+ ranges.emplace_back(std::make_pair(0x30A0, 0x30FF), _("Katakana"));
+ ranges.emplace_back(std::make_pair(0x3100, 0x312F), _("Bopomofo"));
+ ranges.emplace_back(std::make_pair(0x3130, 0x318F), _("Hangul Compatibility Jamo"));
+ ranges.emplace_back(std::make_pair(0x3190, 0x319F), _("Kanbun"));
+ ranges.emplace_back(std::make_pair(0x31A0, 0x31BF), _("Bopomofo Extended"));
+ ranges.emplace_back(std::make_pair(0x31C0, 0x31EF), _("CJK Strokes"));
+ ranges.emplace_back(std::make_pair(0x31F0, 0x31FF), _("Katakana Phonetic Extensions"));
+ ranges.emplace_back(std::make_pair(0x3200, 0x32FF), _("Enclosed CJK Letters and Months"));
+ ranges.emplace_back(std::make_pair(0x3300, 0x33FF), _("CJK Compatibility"));
+ ranges.emplace_back(std::make_pair(0x3400, 0x4DBF), _("CJK Unified Ideographs Extension A"));
+ ranges.emplace_back(std::make_pair(0x4DC0, 0x4DFF), _("Yijing Hexagram Symbols"));
+ ranges.emplace_back(std::make_pair(0x4E00, 0x9FFF), _("CJK Unified Ideographs"));
+ ranges.emplace_back(std::make_pair(0xA000, 0xA48F), _("Yi Syllables"));
+ ranges.emplace_back(std::make_pair(0xA490, 0xA4CF), _("Yi Radicals"));
+ ranges.emplace_back(std::make_pair(0xA4D0, 0xA4FF), _("Lisu"));
+ ranges.emplace_back(std::make_pair(0xA500, 0xA63F), _("Vai"));
+ ranges.emplace_back(std::make_pair(0xA640, 0xA69F), _("Cyrillic Extended-B"));
+ ranges.emplace_back(std::make_pair(0xA6A0, 0xA6FF), _("Bamum"));
+ ranges.emplace_back(std::make_pair(0xA700, 0xA71F), _("Modifier Tone Letters"));
+ ranges.emplace_back(std::make_pair(0xA720, 0xA7FF), _("Latin Extended-D"));
+ ranges.emplace_back(std::make_pair(0xA800, 0xA82F), _("Syloti Nagri"));
+ ranges.emplace_back(std::make_pair(0xA830, 0xA83F), _("Common Indic Number Forms"));
+ ranges.emplace_back(std::make_pair(0xA840, 0xA87F), _("Phags-pa"));
+ ranges.emplace_back(std::make_pair(0xA880, 0xA8DF), _("Saurashtra"));
+ ranges.emplace_back(std::make_pair(0xA8E0, 0xA8FF), _("Devanagari Extended"));
+ ranges.emplace_back(std::make_pair(0xA900, 0xA92F), _("Kayah Li"));
+ ranges.emplace_back(std::make_pair(0xA930, 0xA95F), _("Rejang"));
+ ranges.emplace_back(std::make_pair(0xA960, 0xA97F), _("Hangul Jamo Extended-A"));
+ ranges.emplace_back(std::make_pair(0xA980, 0xA9DF), _("Javanese"));
+ ranges.emplace_back(std::make_pair(0xAA00, 0xAA5F), _("Cham"));
+ ranges.emplace_back(std::make_pair(0xAA60, 0xAA7F), _("Myanmar Extended-A"));
+ ranges.emplace_back(std::make_pair(0xAA80, 0xAADF), _("Tai Viet"));
+ ranges.emplace_back(std::make_pair(0xABC0, 0xABFF), _("Meetei Mayek"));
+ ranges.emplace_back(std::make_pair(0xAC00, 0xD7AF), _("Hangul Syllables"));
+ ranges.emplace_back(std::make_pair(0xD7B0, 0xD7FF), _("Hangul Jamo Extended-B"));
+ ranges.emplace_back(std::make_pair(0xD800, 0xDB7F), _("High Surrogates"));
+ ranges.emplace_back(std::make_pair(0xDB80, 0xDBFF), _("High Private Use Surrogates"));
+ ranges.emplace_back(std::make_pair(0xDC00, 0xDFFF), _("Low Surrogates"));
+ ranges.emplace_back(std::make_pair(0xE000, 0xF8FF), _("Private Use Area"));
+ ranges.emplace_back(std::make_pair(0xF900, 0xFAFF), _("CJK Compatibility Ideographs"));
+ ranges.emplace_back(std::make_pair(0xFB00, 0xFB4F), _("Alphabetic Presentation Forms"));
+ ranges.emplace_back(std::make_pair(0xFB50, 0xFDFF), _("Arabic Presentation Forms-A"));
+ ranges.emplace_back(std::make_pair(0xFE00, 0xFE0F), _("Variation Selectors"));
+ ranges.emplace_back(std::make_pair(0xFE10, 0xFE1F), _("Vertical Forms"));
+ ranges.emplace_back(std::make_pair(0xFE20, 0xFE2F), _("Combining Half Marks"));
+ ranges.emplace_back(std::make_pair(0xFE30, 0xFE4F), _("CJK Compatibility Forms"));
+ ranges.emplace_back(std::make_pair(0xFE50, 0xFE6F), _("Small Form Variants"));
+ ranges.emplace_back(std::make_pair(0xFE70, 0xFEFF), _("Arabic Presentation Forms-B"));
+ ranges.emplace_back(std::make_pair(0xFF00, 0xFFEF), _("Halfwidth and Fullwidth Forms"));
+ ranges.emplace_back(std::make_pair(0xFFF0, 0xFFFF), _("Specials"));
}
return ranges;
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 6092c26d3..03c3587d9 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -1948,16 +1948,16 @@ void InkscapePreferences::initPageSpellcheck()
AspellDictInfoEnumeration *dels = aspell_dict_info_list_elements(dlist);
- languages.push_back(Glib::ustring(C_("Spellchecker language", "None")));
- langValues.push_back(Glib::ustring(""));
+ languages.emplace_back(C_("Spellchecker language", "None"));
+ langValues.emplace_back("");
const AspellDictInfo *entry;
int en_index = 0;
int i = 0;
while ( (entry = aspell_dict_info_enumeration_next(dels)) != nullptr)
{
- languages.push_back(Glib::ustring(entry->name));
- langValues.push_back(Glib::ustring(entry->name));
+ languages.emplace_back(entry->name);
+ langValues.emplace_back(entry->name);
if (!strcmp (entry->name, "en"))
{
en_index = i;
diff --git a/src/ui/dialog/object-attributes.cpp b/src/ui/dialog/object-attributes.cpp
index 9e4339113..629f8c1c8 100644
--- a/src/ui/dialog/object-attributes.cpp
+++ b/src/ui/dialog/object-attributes.cpp
@@ -165,8 +165,8 @@ void ObjectAttributes::widget_setup (void)
int len = 0;
while (desc[len].label)
{
- labels.push_back(desc[len].label);
- attrs.push_back (desc[len].attribute);
+ labels.emplace_back(desc[len].label);
+ attrs.emplace_back(desc[len].attribute);
len += 1;
}
attrTable->set_object(obj, labels, attrs, (GtkWidget*)gobj());
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index 8f92050f5..8daa83e9c 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -60,25 +60,25 @@ ObjectProperties::ObjectProperties()
, _desktop(nullptr)
{
//initialize labels for the table at the bottom of the dialog
- _int_attrs.push_back("onclick");
- _int_attrs.push_back("onmouseover");
- _int_attrs.push_back("onmouseout");
- _int_attrs.push_back("onmousedown");
- _int_attrs.push_back("onmouseup");
- _int_attrs.push_back("onmousemove");
- _int_attrs.push_back("onfocusin");
- _int_attrs.push_back("onfocusout");
- _int_attrs.push_back("onload");
-
- _int_labels.push_back("onclick:");
- _int_labels.push_back("onmouseover:");
- _int_labels.push_back("onmouseout:");
- _int_labels.push_back("onmousedown:");
- _int_labels.push_back("onmouseup:");
- _int_labels.push_back("onmousemove:");
- _int_labels.push_back("onfocusin:");
- _int_labels.push_back("onfocusout:");
- _int_labels.push_back("onload:");
+ _int_attrs.emplace_back("onclick");
+ _int_attrs.emplace_back("onmouseover");
+ _int_attrs.emplace_back("onmouseout");
+ _int_attrs.emplace_back("onmousedown");
+ _int_attrs.emplace_back("onmouseup");
+ _int_attrs.emplace_back("onmousemove");
+ _int_attrs.emplace_back("onfocusin");
+ _int_attrs.emplace_back("onfocusout");
+ _int_attrs.emplace_back("onload");
+
+ _int_labels.emplace_back("onclick:");
+ _int_labels.emplace_back("onmouseover:");
+ _int_labels.emplace_back("onmouseout:");
+ _int_labels.emplace_back("onmousedown:");
+ _int_labels.emplace_back("onmouseup:");
+ _int_labels.emplace_back("onmousemove:");
+ _int_labels.emplace_back("onfocusin:");
+ _int_labels.emplace_back("onfocusout:");
+ _int_labels.emplace_back("onload:");
_desktop_changed_connection = _desktop_tracker.connectDesktopChanged(
sigc::mem_fun(*this, &ObjectProperties::_setTargetDesktop)
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index dbb170025..8dc982b82 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -344,7 +344,7 @@ gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, g
GtkWidget *child = gtk_menu_item_new_with_label(grad->getId());
gtk_menu_shell_append(GTK_MENU_SHELL(popupSub), child);
- popupItems.push_back(grad->getId());
+ popupItems.emplace_back(grad->getId());
g_signal_connect( G_OBJECT(child),
"activate",
G_CALLBACK(SwatchesPanelHook::convertGradient),
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index a4d067acd..578562a79 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -193,7 +193,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
icon_view->set_size_request( 100, 250 );
std::vector< Gtk::TargetEntry > targets;
- targets.push_back(Gtk::TargetEntry( "application/x-inkscape-paste"));
+ targets.emplace_back( "application/x-inkscape-paste");
icon_view->enable_model_drag_source (targets, Gdk::BUTTON1_MASK, Gdk::ACTION_COPY);
icon_view->signal_drag_data_get().connect(
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 561a88a92..e4dfe58a1 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -645,7 +645,7 @@ void Transformation::applyPageMove(Inkscape::Selection *selection)
SPItem* item = *it;
Geom::OptRect bbox = item->desktopPreferredBounds();
if (bbox) {
- sorted.push_back(BBoxSort(item, *bbox, Geom::X, x > 0? 1. : 0., x > 0? 0. : 1.));
+ sorted.emplace_back(item, *bbox, Geom::X, x > 0? 1. : 0., x > 0? 0. : 1.);
}
}
//sort bbox by anchors
@@ -670,7 +670,7 @@ void Transformation::applyPageMove(Inkscape::Selection *selection)
SPItem* item = *it;
Geom::OptRect bbox = item->desktopPreferredBounds();
if (bbox) {
- sorted.push_back(BBoxSort(item, *bbox, Geom::Y, y > 0? 1. : 0., y > 0? 0. : 1.));
+ sorted.emplace_back(item, *bbox, Geom::Y, y > 0? 1. : 0., y > 0? 0. : 1.);
}
}
//sort bbox by anchors
diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp
index f886c0145..8f7a1761b 100644
--- a/src/ui/tool/control-point-selection.cpp
+++ b/src/ui/tool/control-point-selection.cpp
@@ -719,7 +719,7 @@ void ControlPointSelection::getOriginalPoints(std::vector<Inkscape::SnapCandidat
{
pts.clear();
for (iterator i = _points.begin(); i != _points.end(); ++i) {
- pts.push_back(Inkscape::SnapCandidatePoint(_original_positions[*i], SNAPSOURCE_NODE_HANDLE));
+ pts.emplace_back(_original_positions[*i], SNAPSOURCE_NODE_HANDLE);
}
}
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index f64ee7827..9223b44de 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -1285,11 +1285,11 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
boost::optional<Geom::Point> fperp_point, bperp_point;
if (front_point) {
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, *front_point));
+ constraints.emplace_back(origin, *front_point);
fperp_point = Geom::rot90(*front_point);
}
if (back_point) {
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, *back_point));
+ constraints.emplace_back(origin, *back_point);
bperp_point = Geom::rot90(*back_point);
}
// perpendiculars only snap when they are further than snap increment away
@@ -1298,20 +1298,20 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
(fabs(Geom::angle_between(*fperp_point, *back_point)) > min_angle &&
fabs(Geom::angle_between(*fperp_point, *back_point)) < M_PI - min_angle)))
{
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, *fperp_point));
+ constraints.emplace_back(origin, *fperp_point);
}
if (bperp_point && (!front_point ||
(fabs(Geom::angle_between(*bperp_point, *front_point)) > min_angle &&
fabs(Geom::angle_between(*bperp_point, *front_point)) < M_PI - min_angle)))
{
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, *bperp_point));
+ constraints.emplace_back(origin, *bperp_point);
}
sp = sm.multipleConstrainedSnaps(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), constraints, held_shift(*event));
} else {
// with Ctrl, constrain to axes
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, Geom::Point(1, 0)));
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, Geom::Point(0, 1)));
+ constraints.emplace_back(origin, Geom::Point(1, 0));
+ constraints.emplace_back(origin, Geom::Point(0, 1));
sp = sm.multipleConstrainedSnaps(Inkscape::SnapCandidatePoint(new_pos, _snapSourceType()), constraints, held_shift(*event));
}
new_pos = sp.getPoint();
@@ -1621,14 +1621,14 @@ void NodeList::clear()
to_clear.push_back(&rm->_selection);
++in;
}
- nodes.push_back(std::make_pair(rm, in));
+ nodes.emplace_back(rm, in);
}
for (size_t i = 0, e = nodes.size(); i != e; ++i) {
to_clear[nodes[i].second]->erase(nodes[i].first, false);
}
std::vector<std::vector<SelectableControlPoint *> > emission;
for (long i = 0, e = to_clear.size(); i != e; ++i) {
- emission.push_back(std::vector<SelectableControlPoint *>());
+ emission.emplace_back();
for (size_t j = 0, f = nodes.size(); j != f; ++j) {
if (nodes[j].second != i)
break;
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 );
}
}
diff --git a/src/ui/tool/transform-handle-set.cpp b/src/ui/tool/transform-handle-set.cpp
index de91e10e4..382654dad 100644
--- a/src/ui/tool/transform-handle-set.cpp
+++ b/src/ui/tool/transform-handle-set.cpp
@@ -658,8 +658,8 @@ protected:
// constrain to axes
Geom::Point origin = _last_drag_origin();
std::vector<Inkscape::Snapper::SnapConstraint> constraints;
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, Geom::Point(1, 0)));
- constraints.push_back(Inkscape::Snapper::SnapConstraint(origin, Geom::Point(0, 1)));
+ constraints.emplace_back(origin, Geom::Point(1, 0));
+ constraints.emplace_back(origin, Geom::Point(0, 1));
new_pos = sm.multipleConstrainedSnaps(Inkscape::SnapCandidatePoint(new_pos,
SNAPSOURCE_ROTATION_CENTER), constraints, held_shift(*event)).getPoint();
} else if (snap) {
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp
index aaa5f1d9a..a6fc54f1f 100644
--- a/src/ui/tools/flood-tool.cpp
+++ b/src/ui/tools/flood-tool.cpp
@@ -869,7 +869,7 @@ static void sp_flood_do_flood_fill(ToolBase *event_context, GdkEvent *event, boo
bci.current_step = 0;
if (is_point_fill) {
- fill_points.push_back(Geom::Point(event->button.x, event->button.y));
+ fill_points.emplace_back(event->button.x, event->button.y);
} else {
Inkscape::Rubberband *r = Inkscape::Rubberband::get(desktop);
fill_points = r->getPoints();
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index ba2609975..6c8a3f2c3 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -274,7 +274,7 @@ static void spdc_apply_powerstroke_shape(std::vector<Geom::Point> points, Freeha
if (!swidth) {
swidth = swidth/2;
}
- points.push_back(Geom::Point(0, swidth));
+ points.emplace_back(0, swidth);
}
Effect::createAndApply(POWERSTROKE, dc->desktop->doc(), item);
lpe = SP_LPE_ITEM(item)->getCurrentLPE();
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index 842a84f74..f0d6639ab 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -809,7 +809,7 @@ PencilTool::addPowerStrokePencil()
(_previous_pressure > step && pressure_shrunk < step))
{
_previous_pressure = pressure_shrunk;
- this->points.push_back(Geom::Point(0, pressure_computed));
+ this->points.emplace_back(0, pressure_computed);
this->_points_pos.push_back(this->_last_point);
}
if (this->_curve && this->ps.size() > 1) {
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[] = {