Skip to content

Commit 7434139

Browse files
author
jef
committed
fix MSVC warning and stdint.h dependency
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10128 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5888597 commit 7434139

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/core/spatialindex/include/Tools.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
#ifdef _MSC_VER
2626
#include <locale>
2727
#include <limits>
28-
#endif//_MSC_VER
28+
typedef unsigned __int8 uint8_t;
29+
#else
2930
#include <stdint.h>
31+
#endif//_MSC_VER
3032
#include <assert.h>
3133
#include <iostream>
3234
#include <iomanip>

src/core/spatialindex/qgsspatialindex.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ bool QgsSpatialIndex::insertFeature( QgsFeature& f )
113113
}
114114
catch ( Tools::Exception &e )
115115
{
116+
Q_UNUSED(e);
116117
QgsDebugMsg( QString( "Tools::Exception caught: " ).arg( e.what().c_str() ) );
117118
}
118119
catch ( const std::exception &e )
119120
{
121+
Q_UNUSED(e);
120122
QgsDebugMsg( QString( "std::exception caught: " ).arg( e.what() ) );
121123
}
122124
catch ( ... )

src/core/spatialindex/rtree/RTree.cc

+3
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@ long SpatialIndex::RTree::RTree::writeNode( Node* n )
11771177
}
11781178
catch ( Tools::InvalidPageException& e )
11791179
{
1180+
Q_UNUSED(e);
11801181
delete[] buffer;
11811182
QgsDebugMsg( e.what().c_str() );
11821183
throw Tools::IllegalStateException( "writeNode: failed with Tools::InvalidPageException" );
@@ -1222,6 +1223,7 @@ SpatialIndex::RTree::NodePtr SpatialIndex::RTree::RTree::readNode( unsigned long
12221223
}
12231224
catch ( Tools::InvalidPageException& e )
12241225
{
1226+
Q_UNUSED(e);
12251227
QgsDebugMsg( e.what().c_str() );
12261228
throw Tools::IllegalStateException( "readNode: failed with Tools::InvalidPageException" );
12271229
}
@@ -1272,6 +1274,7 @@ void SpatialIndex::RTree::RTree::deleteNode( Node* n )
12721274
}
12731275
catch ( Tools::InvalidPageException& e )
12741276
{
1277+
Q_UNUSED(e);
12751278
QgsDebugMsg( e.what().c_str() );
12761279
throw Tools::IllegalStateException( "deleteNode: failed with Tools::InvalidPageException" );
12771280
}

0 commit comments

Comments
 (0)