1
0
Fork 0

Remove some warnings that MSVC complained about

This commit is contained in:
Christian Schmitt 2012-11-11 11:35:47 +01:00
parent 9db8ec74f0
commit 858191ead9
4 changed files with 97 additions and 98 deletions

View file

@ -57,7 +57,7 @@ int load_usgs_map( const std::string& filename ) {
}
// Translate USGS land cover values into TerraGear area types.
AreaType translateUSGSCover (int usgs_value)
AreaType translateUSGSCover (unsigned int usgs_value)
{
if ( 0<usgs_value && usgs_value<usgs_map.size() ) {
return usgs_map[usgs_value-1];

View file

@ -29,7 +29,6 @@
#include "priorities.hxx"
int load_usgs_map( const std::string& filename );
AreaType translateUSGSCover( int usgs_value );
AreaType translateUSGSCover( unsigned int usgs_value );
#endif // _USGS_HXX

View file

@ -386,7 +386,7 @@ ThreadProc(void* p)
int main( int argc, char **argv ) {
int arg_counter;
long int next_tile;
int sock, msgsock, length, pid;
int sock, msgsock;
fd_set ready;
short unsigned int port;
@ -487,7 +487,7 @@ int main( int argc, char **argv ) {
#ifndef _MSC_VER
// spawn a child
pid = fork();
int pid = fork();
if ( pid < 0 ) {
// error

View file

@ -171,7 +171,7 @@ OGRLinearRing* make_ring_from_fan(const int_list& fan, const std::vector<Point3D
OGRLinearRing* make_ring_from_strip(const int_list& strip, const std::vector<Point3D>& nodes) {
OGRLinearRing* ring = new OGRLinearRing();
const size_t vertex_count = strip.size();
int i;
unsigned int i;
for (i=0;i<vertex_count;i+=2) {
OGRPoint *point=new OGRPoint();
const Point3D& node = nodes[strip[i]];
@ -223,11 +223,11 @@ void make_feature_from_ring(OGRLinearRing* ring, const std::string& material, co
void convert_triangles(const std::string& path, const group_list& verts, const string_list& materials, const std::vector<Point3D>& wgs84_nodes) {
const size_t groups_count = verts.size();
for (int i=0;i<groups_count;i++) {
for (unsigned int i=0;i<groups_count;i++) {
const string& material = materials[i];
const int_list& tri_verts = verts[i];
const size_t vertices = tri_verts.size();
for (int j=0;j<vertices;j+=3) {
for (unsigned int j=0;j<vertices;j+=3) {
OGRLinearRing* ring = new OGRLinearRing();
for (int k=0;k<3;k++) {
OGRPoint *point=new OGRPoint();
@ -247,7 +247,7 @@ void convert_triangles(const std::string& path, const group_list& verts, const s
void convert_triangle_fans(const std::string& path, const group_list& verts, const string_list& materials, const std::vector<Point3D>& wgs84_nodes) {
const size_t groups_count = verts.size();
for (int i=0;i<groups_count;i++) {
for (unsigned int i=0;i<groups_count;i++) {
const string& material = materials[i];
OGRLinearRing* ring = make_ring_from_fan(verts[i], wgs84_nodes);
make_feature_from_ring(ring, material, path);
@ -257,7 +257,7 @@ void convert_triangle_fans(const std::string& path, const group_list& verts, con
void convert_triangle_strips(const std::string& path, const group_list& verts, const string_list& materials, const std::vector<Point3D>& wgs84_nodes) {
const size_t groups_count = verts.size();
for (int i=0;i<groups_count;i++) {
for (unsigned int i=0;i<groups_count;i++) {
const string& material = materials[i];
OGRLinearRing* ring = make_ring_from_strip(verts[i], wgs84_nodes);
make_feature_from_ring(ring, material, path);
@ -274,7 +274,7 @@ void process_scenery_file(const std::string& path) {
const std::vector<SGVec3d>& wgs84_nodes = binObject.get_wgs84_nodes();
std::vector<Point3D> geod_nodes;
const size_t node_count = wgs84_nodes.size();
for (int i=0;i<node_count;i++) {
for (unsigned int i=0;i<node_count;i++) {
SGVec3d wgs84 = wgs84_nodes[i];
Point3D raw = Point3D( gbs_center.x() + wgs84.x(),
gbs_center.y() + wgs84.y(),