Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6490 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 2, 2007
1 parent 5a32dd4 commit 27e71d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -368,7 +368,7 @@ bool QgsPostgresProvider::getNextFeature(QgsFeature& feat,
feat.setFeatureId(oid);

// fetch attributes
if (fetchAttributes.count() == fieldCount())
if (static_cast<uint>(fetchAttributes.count()) == fieldCount())
getFeatureAttributes(oid, row, feat); // only one sql query to get all attributes
else
getFeatureAttributes(oid, row, feat, fetchAttributes); // ineffective: one sql per attribute
Expand Down Expand Up @@ -1019,7 +1019,7 @@ QString QgsPostgresProvider::chooseViewColumn(const tableCols& cols)
// 'oid' columns in tables don't have a constraint on them, but
// they are useful to consider, so add them in if not already
// here.
for (int i = 0; i < oids.size(); ++i)
for (uint i = 0; i < oids.size(); ++i)
{
if (suitable.find(oids[i]->first) == suitable.end())
{
Expand Down Expand Up @@ -1493,7 +1493,7 @@ bool QgsPostgresProvider::addFeature(QgsFeature& f, int primaryKeyHighWater)
// Add the WKB geometry to the INSERT statement
QgsGeometry* geometry = f.geometry();
unsigned char* geom = geometry->wkbBuffer();
for (int i=0; i < geometry->wkbSize(); ++i)
for (uint i=0; i < geometry->wkbSize(); ++i)
{
if (useWkbHex)
{
Expand Down Expand Up @@ -1929,7 +1929,7 @@ bool QgsPostgresProvider::changeGeometryValues(QgsGeometryMap & geometry_map)

// Add the WKB geometry to the UPDATE statement
unsigned char* geom = iter->wkbBuffer();
for (int i=0; i < iter->wkbSize(); ++i)
for (uint i=0; i < iter->wkbSize(); ++i)
{
if (useWkbHex)
{
Expand Down
12 changes: 6 additions & 6 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -65,13 +65,13 @@ QgsWmsProvider::QgsWmsProvider(QString const & uri)
mHttpProxyUser(0),
mHttpProxyPass(0),
httpcapabilitiesresponse(0),
imageCrs(DEFAULT_LATLON_CRS),
cachedImage(0),
cachedViewExtent(0),
cachedPixelWidth(0),
cachedPixelHeight(0),
mCoordinateTransform(0),
extentDirty(TRUE),
imageCrs(DEFAULT_LATLON_CRS),
mGetFeatureInfoUrlBase(0)
{
#ifdef QGISDEBUG
Expand Down Expand Up @@ -224,7 +224,7 @@ QSet<QString> QgsWmsProvider::supportedCrsForLayers(QStringList const & layers)
QSet<QString> crsSet;

// convert std::vector to std::set for set comparisons
for (int j = 0; j < crsVector.size(); j++)
for (uint j = 0; j < crsVector.size(); j++)
{
crsSet.insert( crsVector[j] );
}
Expand Down Expand Up @@ -1647,7 +1647,7 @@ void QgsWmsProvider::parseLayer(QDomElement const & e, QgsWmsLayerProperty& laye
extentForLayer[ layerProperty.name ] = layerProperty.ex_GeographicBoundingBox;

// see if we can refine the bounding box with the CRS-specific bounding boxes
for ( int i = 0; i < layerProperty.boundingBox.size(); i++ )
for ( uint i = 0; i < layerProperty.boundingBox.size(); i++ )
{
#ifdef QGISDEBUG
std::cout << "QgsWmsProvider::parseLayer: testing bounding box CRS which is "
Expand Down Expand Up @@ -2128,7 +2128,7 @@ QString QgsWmsProvider::getMetadata()

// Iterate through layers

for (int i = 0; i < layersSupported.size(); i++)
for (uint i = 0; i < layersSupported.size(); i++)
{

// TODO: Handle nested layers
Expand Down Expand Up @@ -2247,7 +2247,7 @@ QString QgsWmsProvider::getMetadata()
myMetadataQString += "</td></tr>";

// Layer Coordinate Reference Systems
for ( int j = 0; j < layersSupported[i].crs.size(); j++ )
for ( uint j = 0; j < layersSupported[i].crs.size(); j++ )
{
myMetadataQString += "<tr><td bgcolor=\"gray\">";
myMetadataQString += tr("Available in CRS");
Expand All @@ -2258,7 +2258,7 @@ QString QgsWmsProvider::getMetadata()
}

// Layer Styles
for (int j = 0; j < layersSupported[i].style.size(); j++)
for (uint j = 0; j < layersSupported[i].style.size(); j++)
{
myMetadataQString += "<tr><td bgcolor=\"gray\">";
myMetadataQString += tr("Available in style");
Expand Down

0 comments on commit 27e71d8

Please sign in to comment.