@@ -48,22 +48,22 @@ DualEdgeTriangulation::~DualEdgeTriangulation()
48
48
49
49
void DualEdgeTriangulation::performConsistencyTest ()
50
50
{
51
- QgsDebugMsg ( " performing consistency test" );
51
+ QgsDebugMsg ( QStringLiteral ( " performing consistency test" ) );
52
52
53
53
for ( int i = 0 ; i < mHalfEdge .count (); i++ )
54
54
{
55
55
int a = mHalfEdge [mHalfEdge [i]->getDual ()]->getDual ();
56
56
int b = mHalfEdge [mHalfEdge [mHalfEdge [i]->getNext ()]->getNext ()]->getNext ();
57
57
if ( i != a )
58
58
{
59
- QgsDebugMsg ( " warning, first test failed" );
59
+ QgsDebugMsg ( QStringLiteral ( " warning, first test failed" ) );
60
60
}
61
61
if ( i != b )
62
62
{
63
- QgsDebugMsg ( " warning, second test failed" );
63
+ QgsDebugMsg ( QStringLiteral ( " warning, second test failed" ) );
64
64
}
65
65
}
66
- QgsDebugMsg ( " consistency test finished" );
66
+ QgsDebugMsg ( QStringLiteral ( " consistency test finished" ) );
67
67
}
68
68
69
69
void DualEdgeTriangulation::addLine ( const QVector<QgsPoint> &points, QgsInterpolator::SourceType lineType )
@@ -134,7 +134,7 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
134
134
// test, if it is the same point as the first point
135
135
if ( p.x () == mPointVector [0 ]->x () && p.y () == mPointVector [0 ]->y () )
136
136
{
137
- QgsDebugMsg ( " second point is the same as the first point, it thus has not been inserted" );
137
+ QgsDebugMsg ( QStringLiteral ( " second point is the same as the first point, it thus has not been inserted" ) );
138
138
QgsPoint *p = mPointVector [1 ];
139
139
mPointVector .remove ( 1 );
140
140
delete p;
@@ -200,7 +200,7 @@ int DualEdgeTriangulation::addPoint( const QgsPoint &p )
200
200
else // p is in a line with p0 and p1
201
201
{
202
202
mPointVector .remove ( mPointVector .count () - 1 );
203
- QgsDebugMsg ( " error: third point is on the same line as the first and the second point. It thus has not been inserted into the triangulation" );
203
+ QgsDebugMsg ( QStringLiteral ( " error: third point is on the same line as the first and the second point. It thus has not been inserted into the triangulation" ) );
204
204
return -100 ;
205
205
}
206
206
}
@@ -392,7 +392,7 @@ int DualEdgeTriangulation::baseEdgeOfPoint( int point )
392
392
control += 1 ;
393
393
if ( control > 1000000 )
394
394
{
395
- // QgsDebugMsg( "warning, endless loop" );
395
+ // QgsDebugMsg( QStringLiteral( "warning, endless loop" ) );
396
396
397
397
// use the secure and slow method
398
398
// qWarning( "******************warning, using the slow method in baseEdgeOfPoint****************************************" );
@@ -626,7 +626,7 @@ bool DualEdgeTriangulation::calcNormal( double x, double y, Vector3D *result )
626
626
}
627
627
else
628
628
{
629
- QgsDebugMsg ( " warning, null pointer" );
629
+ QgsDebugMsg ( QStringLiteral ( " warning, null pointer" ) );
630
630
return false ;
631
631
}
632
632
}
@@ -639,7 +639,7 @@ bool DualEdgeTriangulation::calcPoint( double x, double y, QgsPoint &result )
639
639
}
640
640
else
641
641
{
642
- QgsDebugMsg ( " warning, null pointer" );
642
+ QgsDebugMsg ( QStringLiteral ( " warning, null pointer" ) );
643
643
return false ;
644
644
}
645
645
}
@@ -1167,7 +1167,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, QgsInterpolator:
1167
1167
control += 1 ;
1168
1168
if ( control > 17000 )
1169
1169
{
1170
- QgsDebugMsg ( " warning, endless loop" );
1170
+ QgsDebugMsg ( QStringLiteral ( " warning, endless loop" ) );
1171
1171
return -100 ;// return an error code
1172
1172
}
1173
1173
@@ -1534,7 +1534,7 @@ void DualEdgeTriangulation::setTriangleInterpolator( TriangleInterpolator *inter
1534
1534
1535
1535
void DualEdgeTriangulation::eliminateHorizontalTriangles ()
1536
1536
{
1537
- QgsDebugMsg ( " am in eliminateHorizontalTriangles" );
1537
+ QgsDebugMsg ( QStringLiteral ( " am in eliminateHorizontalTriangles" ) );
1538
1538
double minangle = 0 ;// minimum angle for swapped triangles. If triangles generated by a swap would have a minimum angle (in degrees) below that value, the swap will not be done.
1539
1539
1540
1540
while ( true )
@@ -1618,7 +1618,7 @@ void DualEdgeTriangulation::eliminateHorizontalTriangles()
1618
1618
delete[] control;
1619
1619
}
1620
1620
1621
- QgsDebugMsg ( " end of method" );
1621
+ QgsDebugMsg ( QStringLiteral ( " end of method" ) );
1622
1622
}
1623
1623
1624
1624
void DualEdgeTriangulation::ruppertRefinement ()
@@ -1714,7 +1714,7 @@ void DualEdgeTriangulation::ruppertRefinement()
1714
1714
// calculate the circumcenter
1715
1715
if ( !MathUtils::circumcenter ( mPointVector [mHalfEdge [minedge]->getPoint ()], mPointVector [mHalfEdge [minedgenext]->getPoint ()], mPointVector [mHalfEdge [minedgenextnext]->getPoint ()], &circumcenter ) )
1716
1716
{
1717
- QgsDebugMsg ( " warning, calculation of circumcenter failed" );
1717
+ QgsDebugMsg ( QStringLiteral ( " warning, calculation of circumcenter failed" ) );
1718
1718
// put all three edges to dontexamine and remove them from the other maps
1719
1719
dontexamine.insert ( minedge );
1720
1720
edge_angle.erase ( minedge );
@@ -1757,7 +1757,7 @@ void DualEdgeTriangulation::ruppertRefinement()
1757
1757
{
1758
1758
encroached = true;
1759
1759
//split segment
1760
- QgsDebugMsg( "segment split" );
1760
+ QgsDebugMsg( QStringLiteral( "segment split" ) );
1761
1761
int pointno = splitHalfEdge( i, 0.5 );
1762
1762
1763
1763
//update dontexmine, angle_edge, edge_angle
@@ -1963,7 +1963,7 @@ void DualEdgeTriangulation::ruppertRefinement()
1963
1963
if ( ( mHalfEdge [*it]->getForced () || edgeOnConvexHull ( *it ) ) && MathUtils::inDiametral ( mPointVector [mHalfEdge [*it]->getPoint ()], mPointVector [mHalfEdge [mHalfEdge [*it]->getDual ()]->getPoint ()], &circumcenter ) )
1964
1964
{
1965
1965
// split segment
1966
- QgsDebugMsg ( " segment split" );
1966
+ QgsDebugMsg ( QStringLiteral ( " segment split" ) );
1967
1967
int pointno = splitHalfEdge ( *it, 0.5 );
1968
1968
encroached = true ;
1969
1969
@@ -2142,7 +2142,7 @@ void DualEdgeTriangulation::ruppertRefinement()
2142
2142
}
2143
2143
if ( !flag )
2144
2144
{
2145
- QgsDebugMsg ( " point is not present in the triangulation" );
2145
+ QgsDebugMsg ( QStringLiteral ( " point is not present in the triangulation" ) );
2146
2146
}
2147
2147
}
2148
2148
// put all three edges to dontexamine and remove them from the other maps
@@ -2158,7 +2158,7 @@ void DualEdgeTriangulation::ruppertRefinement()
2158
2158
}
2159
2159
else // insertion successful
2160
2160
{
2161
- QgsDebugMsg ( " circumcenter added" );
2161
+ QgsDebugMsg ( QStringLiteral ( " circumcenter added" ) );
2162
2162
2163
2163
// update the maps
2164
2164
// go around the inserted point and make changes for every half edge
@@ -2480,7 +2480,7 @@ void DualEdgeTriangulation::triangulatePolygon( QList<int> *poly, QList<int> *fr
2480
2480
2481
2481
else
2482
2482
{
2483
- QgsDebugMsg ( " warning, null pointer" );
2483
+ QgsDebugMsg ( QStringLiteral ( " warning, null pointer" ) );
2484
2484
}
2485
2485
2486
2486
}
@@ -2557,7 +2557,7 @@ bool DualEdgeTriangulation::pointInside( double x, double y )
2557
2557
}
2558
2558
if ( numinstabs > 0 )// a numerical instability occurred
2559
2559
{
2560
- QgsDebugMsg ( " numerical instabilities" );
2560
+ QgsDebugMsg ( QStringLiteral ( " numerical instabilities" ) );
2561
2561
return true ;
2562
2562
}
2563
2563
@@ -2964,13 +2964,13 @@ QList<int> *DualEdgeTriangulation::getPointsAroundEdge( double x, double y )
2964
2964
}
2965
2965
else
2966
2966
{
2967
- QgsDebugMsg ( " warning: null pointer" );
2967
+ QgsDebugMsg ( QStringLiteral ( " warning: null pointer" ) );
2968
2968
return nullptr ;
2969
2969
}
2970
2970
}
2971
2971
else
2972
2972
{
2973
- QgsDebugMsg ( " Edge number negative" );
2973
+ QgsDebugMsg ( QStringLiteral ( " Edge number negative" ) );
2974
2974
return nullptr ;
2975
2975
}
2976
2976
}
@@ -2985,7 +2985,7 @@ bool DualEdgeTriangulation::saveTriangulation( QgsFeatureSink *sink, QgsFeedback
2985
2985
bool *alreadyVisitedEdges = new bool [mHalfEdge .size ()];
2986
2986
if ( !alreadyVisitedEdges )
2987
2987
{
2988
- QgsDebugMsg ( " out of memory" );
2988
+ QgsDebugMsg ( QStringLiteral ( " out of memory" ) );
2989
2989
return false ;
2990
2990
}
2991
2991
@@ -3083,7 +3083,7 @@ int DualEdgeTriangulation::splitHalfEdge( int edge, float position )
3083
3083
// just a short test if position is between 0 and 1
3084
3084
if ( position < 0 || position > 1 )
3085
3085
{
3086
- QgsDebugMsg ( " warning, position is not between 0 and 1" );
3086
+ QgsDebugMsg ( QStringLiteral ( " warning, position is not between 0 and 1" ) );
3087
3087
}
3088
3088
3089
3089
// create the new point on the heap
0 commit comments