Use <simgear/compiler.h> functionality to make STL includes more portable.
This commit is contained in:
parent
20dc0cf8a0
commit
0a4cc36775
3 changed files with 18 additions and 13 deletions
|
@ -1,7 +1,9 @@
|
||||||
#ifndef MASK_INCLUDED // -*- C++ -*-
|
#ifndef MASK_INCLUDED // -*- C++ -*-
|
||||||
#define MASK_INCLUDED
|
#define MASK_INCLUDED
|
||||||
|
|
||||||
#include <istream>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
|
#include STL_IOSTREAM
|
||||||
|
|
||||||
using std::istream;
|
using std::istream;
|
||||||
|
|
||||||
|
|
|
@ -101,8 +101,8 @@ static void draw_dem()
|
||||||
{
|
{
|
||||||
Map *bits = DEM;
|
Map *bits = DEM;
|
||||||
|
|
||||||
glPixelZoom((float)glutGet(GLUT_WINDOW_WIDTH) / (float)DEM->width ,
|
glPixelZoom((float)glutGet((GLenum)GLUT_WINDOW_WIDTH) / (float)DEM->width ,
|
||||||
-(float)glutGet(GLUT_WINDOW_HEIGHT) / (float)DEM->height);
|
-(float)glutGet((GLenum)GLUT_WINDOW_HEIGHT) / (float)DEM->height);
|
||||||
glRasterPos3f(0, 0, 0);
|
glRasterPos3f(0, 0, 0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ void mesh_mouse(int button, int state, int x, int y)
|
||||||
if( button == GLUT_LEFT_BUTTON )
|
if( button == GLUT_LEFT_BUTTON )
|
||||||
{
|
{
|
||||||
GLdouble u, v, z;
|
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);
|
glUnproject(x, win_height-y, 0, &u, &v, &z);
|
||||||
if( u<0 ) u = 0;
|
if( u<0 ) u = 0;
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
#include "terra.h"
|
#include <simgear/compiler.h>
|
||||||
#include <fstream>
|
|
||||||
|
#include STL_FSTREAM
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
|
|
||||||
using std::cerr;
|
#include "terra.h"
|
||||||
using std::cout;
|
|
||||||
using std::endl;
|
SG_USING_STD(cerr);
|
||||||
using std::istream;
|
SG_USING_STD(cout);
|
||||||
using std::ostream;
|
SG_USING_STD(endl);
|
||||||
using std::ofstream;
|
SG_USING_STD(istream);
|
||||||
using std::streampos;
|
SG_USING_STD(ostream);
|
||||||
|
SG_USING_STD(ofstream);
|
||||||
|
SG_USING_STD(streampos);
|
||||||
|
|
||||||
|
|
||||||
void generate_output(char *filename, FileFormat format)
|
void generate_output(char *filename, FileFormat format)
|
||||||
|
|
Loading…
Add table
Reference in a new issue