1
0
Fork 0

Use <simgear/compiler.h> functionality to make STL includes more portable.

This commit is contained in:
curt 2003-08-27 14:02:29 +00:00
parent 20dc0cf8a0
commit 0a4cc36775
3 changed files with 18 additions and 13 deletions

View file

@ -1,7 +1,9 @@
#ifndef MASK_INCLUDED // -*- C++ -*-
#define MASK_INCLUDED
#include <istream>
#include <simgear/compiler.h>
#include STL_IOSTREAM
using std::istream;

View file

@ -101,8 +101,8 @@ static void draw_dem()
{
Map *bits = DEM;
glPixelZoom((float)glutGet(GLUT_WINDOW_WIDTH) / (float)DEM->width ,
-(float)glutGet(GLUT_WINDOW_HEIGHT) / (float)DEM->height);
glPixelZoom((float)glutGet((GLenum)GLUT_WINDOW_WIDTH) / (float)DEM->width ,
-(float)glutGet((GLenum)GLUT_WINDOW_HEIGHT) / (float)DEM->height);
glRasterPos3f(0, 0, 0);
@ -160,7 +160,7 @@ void mesh_mouse(int button, int state, int x, int y)
if( button == GLUT_LEFT_BUTTON )
{
GLdouble u, v, z;
int win_height = glutGet(GLUT_WINDOW_HEIGHT);
int win_height = glutGet((GLenum)GLUT_WINDOW_HEIGHT);
glUnproject(x, win_height-y, 0, &u, &v, &z);
if( u<0 ) u = 0;

View file

@ -1,14 +1,17 @@
#include "terra.h"
#include <fstream>
#include <simgear/compiler.h>
#include STL_FSTREAM
#include <streambuf>
using std::cerr;
using std::cout;
using std::endl;
using std::istream;
using std::ostream;
using std::ofstream;
using std::streampos;
#include "terra.h"
SG_USING_STD(cerr);
SG_USING_STD(cout);
SG_USING_STD(endl);
SG_USING_STD(istream);
SG_USING_STD(ostream);
SG_USING_STD(ofstream);
SG_USING_STD(streampos);
void generate_output(char *filename, FileFormat format)