Remove some warnings that MSVC complained about
This commit is contained in:
parent
9db8ec74f0
commit
858191ead9
4 changed files with 97 additions and 98 deletions
|
@ -57,7 +57,7 @@ int load_usgs_map( const std::string& filename ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Translate USGS land cover values into TerraGear area types.
|
// 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() ) {
|
if ( 0<usgs_value && usgs_value<usgs_map.size() ) {
|
||||||
return usgs_map[usgs_value-1];
|
return usgs_map[usgs_value-1];
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include "priorities.hxx"
|
#include "priorities.hxx"
|
||||||
|
|
||||||
int load_usgs_map( const std::string& filename );
|
int load_usgs_map( const std::string& filename );
|
||||||
AreaType translateUSGSCover( int usgs_value );
|
AreaType translateUSGSCover( unsigned int usgs_value );
|
||||||
|
|
||||||
#endif // _USGS_HXX
|
#endif // _USGS_HXX
|
||||||
|
|
||||||
|
|
|
@ -386,7 +386,7 @@ ThreadProc(void* p)
|
||||||
int main( int argc, char **argv ) {
|
int main( int argc, char **argv ) {
|
||||||
int arg_counter;
|
int arg_counter;
|
||||||
long int next_tile;
|
long int next_tile;
|
||||||
int sock, msgsock, length, pid;
|
int sock, msgsock;
|
||||||
fd_set ready;
|
fd_set ready;
|
||||||
short unsigned int port;
|
short unsigned int port;
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ int main( int argc, char **argv ) {
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
// spawn a child
|
// spawn a child
|
||||||
pid = fork();
|
int pid = fork();
|
||||||
|
|
||||||
if ( pid < 0 ) {
|
if ( pid < 0 ) {
|
||||||
// error
|
// error
|
||||||
|
|
|
@ -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* make_ring_from_strip(const int_list& strip, const std::vector<Point3D>& nodes) {
|
||||||
OGRLinearRing* ring = new OGRLinearRing();
|
OGRLinearRing* ring = new OGRLinearRing();
|
||||||
const size_t vertex_count = strip.size();
|
const size_t vertex_count = strip.size();
|
||||||
int i;
|
unsigned int i;
|
||||||
for (i=0;i<vertex_count;i+=2) {
|
for (i=0;i<vertex_count;i+=2) {
|
||||||
OGRPoint *point=new OGRPoint();
|
OGRPoint *point=new OGRPoint();
|
||||||
const Point3D& node = nodes[strip[i]];
|
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) {
|
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();
|
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 string& material = materials[i];
|
||||||
const int_list& tri_verts = verts[i];
|
const int_list& tri_verts = verts[i];
|
||||||
const size_t vertices = tri_verts.size();
|
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();
|
OGRLinearRing* ring = new OGRLinearRing();
|
||||||
for (int k=0;k<3;k++) {
|
for (int k=0;k<3;k++) {
|
||||||
OGRPoint *point=new OGRPoint();
|
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) {
|
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();
|
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 string& material = materials[i];
|
||||||
OGRLinearRing* ring = make_ring_from_fan(verts[i], wgs84_nodes);
|
OGRLinearRing* ring = make_ring_from_fan(verts[i], wgs84_nodes);
|
||||||
make_feature_from_ring(ring, material, path);
|
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) {
|
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();
|
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 string& material = materials[i];
|
||||||
OGRLinearRing* ring = make_ring_from_strip(verts[i], wgs84_nodes);
|
OGRLinearRing* ring = make_ring_from_strip(verts[i], wgs84_nodes);
|
||||||
make_feature_from_ring(ring, material, path);
|
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();
|
const std::vector<SGVec3d>& wgs84_nodes = binObject.get_wgs84_nodes();
|
||||||
std::vector<Point3D> geod_nodes;
|
std::vector<Point3D> geod_nodes;
|
||||||
const size_t node_count = wgs84_nodes.size();
|
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];
|
SGVec3d wgs84 = wgs84_nodes[i];
|
||||||
Point3D raw = Point3D( gbs_center.x() + wgs84.x(),
|
Point3D raw = Point3D( gbs_center.x() + wgs84.x(),
|
||||||
gbs_center.y() + wgs84.y(),
|
gbs_center.y() + wgs84.y(),
|
||||||
|
|
Loading…
Reference in a new issue