Skip to content
Permalink
Browse files
Changes to try to avoid compile errors (that others get, but not me)
git-svn-id: http://svn.osgeo.org/qgis/trunk@5395 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Apr 29, 2006
1 parent 72d2576 commit ba0ea16486492ec8178fc75a54e8f7e5c0816d85
Showing with 23 additions and 14 deletions.
  1. +23 −14 src/gui/qgslabel.cpp
@@ -467,19 +467,23 @@ void QgsLabel::labelPoint ( std::vector<QgsPoint>& points, QgsFeature *feature )
case QGis::WKBPoint:
case QGis::WKBLineString:
case QGis::WKBPolygon:
labelPoint(point, geom);
points.push_back(point);
{
labelPoint(point, geom);
points.push_back(point);
}
break;
case QGis::WKBMultiPoint:
case QGis::WKBMultiLineString:
case QGis::WKBMultiPolygon:
// Return a position for each individual in the multi-feature
int numFeatures = (int)(*(geom + 5));
geom += 9; // now points to start of array of WKB's
for (int i = 0; i < numFeatures; ++i)
{
geom = labelPoint(point, geom);
points.push_back(point);
int numFeatures = (int)(*(geom + 5));
geom += 9; // now points to start of array of WKB's
for (int i = 0; i < numFeatures; ++i)
{
geom = labelPoint(point, geom);
points.push_back(point);
}
}
break;
default:
@@ -506,13 +510,16 @@ unsigned char* QgsLabel::labelPoint ( QgsPoint& point, unsigned char* geom)
switch (wkbType)
{
case QGis::WKBPoint:
x = (double *) (geom + 5);
y = (double *) (geom + 5 + sizeof(double));
point.set(*x, *y);
nextFeature += 1 + sizeOfInt + sizeOfDouble*2;
{
x = (double *) (geom + 5);
y = (double *) (geom + 5 + sizeof(double));
point.set(*x, *y);
nextFeature += 1 + sizeOfInt + sizeOfDouble*2;
}
break;

case QGis::WKBLineString: // Line center
{
double dx, dy, tl, l;
ptr = geom + 5;
nPoints = (int *)ptr;
@@ -548,9 +555,11 @@ unsigned char* QgsLabel::labelPoint ( QgsPoint& point, unsigned char* geom)
}
l += dl;
}
break;
}
break;

case QGis::WKBPolygon:
{
double sx, sy;
ptr = geom + 1 + 2 * sizeof(int); // set pointer to the first ring
nPoints = (int *) ptr;
@@ -573,8 +582,8 @@ unsigned char* QgsLabel::labelPoint ( QgsPoint& point, unsigned char* geom)
nextRing += sizeOfInt + numPoints*sizeOfDouble*2;
}
nextFeature = nextRing;

break;
}
break;

default:
// To get here is a bug because our caller should be filtering

0 comments on commit ba0ea16

Please sign in to comment.