Removed remaining "using"-declarations from header-files.
This commit is contained in:
parent
e4ac5911ae
commit
521f9e2fc9
16 changed files with 49 additions and 50 deletions
|
@ -28,10 +28,6 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#ifdef NEEDNAMESPACESTD
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
#include <simgear/math/sg_types.hxx>
|
||||
|
||||
#include <Polygon/polygon.hxx>
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
|
||||
class VpfTable;
|
||||
|
||||
|
||||
|
@ -52,7 +49,7 @@ public:
|
|||
*
|
||||
* @return The subdirectory for a tile.
|
||||
*/
|
||||
virtual string getTileSubdir () const;
|
||||
virtual std::string getTileSubdir () const;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Terra {
|
||||
|
||||
typedef double real;
|
||||
|
@ -172,10 +174,10 @@ public:
|
|||
p[Y] = (c*l.a - a*l.c)/den;
|
||||
}
|
||||
|
||||
friend ostream& operator<<(ostream&, const Line&);
|
||||
friend std::ostream& operator<<(std::ostream&, const Line&);
|
||||
};
|
||||
|
||||
inline ostream& operator<<(ostream &out, const Line& l)
|
||||
inline std::ostream& operator<<(std::ostream &out, const Line& l)
|
||||
{
|
||||
return out << "Line(a=" << l.a << " b=" << l.b << " c=" << l.c << ")";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
namespace Terra {
|
||||
|
||||
using std::istream;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
using std::istream;
|
||||
|
||||
#include "Geom.h"
|
||||
|
||||
namespace Terra {
|
||||
|
@ -25,13 +23,13 @@ public:
|
|||
real eval(real i, real j) { return eval((int)i,(int)j); }
|
||||
virtual real eval(int i, int j) = 0;
|
||||
|
||||
virtual void rawRead(istream&) = 0;
|
||||
virtual void textRead(istream&) = 0;
|
||||
virtual void rawRead(std::istream&) = 0;
|
||||
virtual void textRead(std::istream&) = 0;
|
||||
virtual void *getBlock() { return NULL; }
|
||||
virtual void findLimits();
|
||||
};
|
||||
|
||||
extern Map *readPGM(istream&);
|
||||
extern Map *readPGM(std::istream&);
|
||||
|
||||
|
||||
|
||||
|
@ -57,8 +55,8 @@ public:
|
|||
real eval(int i, int j) { return (real)ref(i,j); }
|
||||
void *getBlock() { return data; }
|
||||
|
||||
void rawRead(istream&);
|
||||
void textRead(istream&);
|
||||
void rawRead(std::istream&);
|
||||
void textRead(std::istream&);
|
||||
};
|
||||
|
||||
typedef DirectMap<unsigned char> ByteMap;
|
||||
|
@ -79,7 +77,7 @@ DirectMap<T>::DirectMap(int w, int h)
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void DirectMap<T>::rawRead(istream& in)
|
||||
void DirectMap<T>::rawRead(std::istream& in)
|
||||
{
|
||||
char *loc = (char *)data;
|
||||
int target = width*height*sizeof(T);
|
||||
|
@ -93,7 +91,7 @@ void DirectMap<T>::rawRead(istream& in)
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void DirectMap<T>::textRead(istream& in)
|
||||
void DirectMap<T>::textRead(std::istream& in)
|
||||
{
|
||||
for(int j=0;j<height;j++)
|
||||
for(int i=0;i<width;i++)
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "Geom.h"
|
||||
#include "Mask.h"
|
||||
|
||||
using std::istream;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
using std::istream;
|
||||
|
||||
namespace Terra {
|
||||
|
||||
class ImportMask
|
||||
|
@ -50,7 +48,7 @@ inline real& RealMask::ref(int i, int j)
|
|||
return data[j*width + i];
|
||||
}
|
||||
|
||||
extern RealMask *readMask(istream&);
|
||||
extern RealMask *readMask(std::istream&);
|
||||
|
||||
}; // namespace Terra
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "Geom.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Terra {
|
||||
|
||||
class Triangle;
|
||||
|
@ -74,7 +76,7 @@ inline boolean leftOf(const Vec2& x, const Edge *e)
|
|||
}
|
||||
|
||||
|
||||
inline ostream& operator<<(ostream& out, const Edge *e)
|
||||
inline std::ostream& operator<<(std::ostream& out, const Edge *e)
|
||||
{
|
||||
return out << "{ " << e->Org() << " ---> " << e->Dest() << " }";
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "Quadedge.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Terra {
|
||||
|
||||
class Subdivision;
|
||||
|
@ -85,7 +87,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
inline ostream& operator<<(ostream& out, Triangle& t)
|
||||
inline std::ostream& operator<<(std::ostream& out, Triangle& t)
|
||||
{
|
||||
return out << "Triangle("<< t.point1() << " " << t.point2() << " "
|
||||
<< t.point3() << ")";
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
using std::ostream;
|
||||
using std::istream;
|
||||
|
||||
namespace Terra {
|
||||
|
||||
class Vec2 {
|
||||
|
@ -44,8 +41,8 @@ public:
|
|||
inline real operator*(const Vec2& v) const;
|
||||
|
||||
// Input/Output methods
|
||||
friend ostream& operator<<(ostream&, const Vec2&);
|
||||
friend istream& operator>>(istream&, Vec2&);
|
||||
friend std::ostream& operator<<(std::ostream&, const Vec2&);
|
||||
friend std::istream& operator>>(std::istream&, Vec2&);
|
||||
|
||||
// Additional vector methods
|
||||
inline real length();
|
||||
|
@ -160,12 +157,12 @@ inline real Vec2::unitize()
|
|||
return l;
|
||||
}
|
||||
|
||||
inline ostream& operator<<(ostream& out, const Vec2& v)
|
||||
inline std::ostream& operator<<(std::ostream& out, const Vec2& v)
|
||||
{
|
||||
return out << "[" << v[0] << " " << v[1] << "]";
|
||||
}
|
||||
|
||||
inline istream& operator>>(istream& in, Vec2& v)
|
||||
inline std::istream& operator>>(std::istream& in, Vec2& v)
|
||||
{
|
||||
char c;
|
||||
return in >> c >> v[0] >> v[1] >> c;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef VEC3_INCLUDED // -*- C++ -*-
|
||||
#define VEC3_INCLUDED
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Terra {
|
||||
|
||||
class Vec3 {
|
||||
|
@ -41,8 +43,8 @@ public:
|
|||
|
||||
|
||||
// Input/Output methods
|
||||
friend ostream& operator<<(ostream&, const Vec3&);
|
||||
friend istream& operator>>(istream&, Vec3&);
|
||||
friend std::ostream& operator<<(std::ostream&, const Vec3&);
|
||||
friend std::istream& operator>>(std::istream&, Vec3&);
|
||||
|
||||
// Additional vector methods
|
||||
inline real length();
|
||||
|
@ -165,12 +167,12 @@ inline real Vec3::unitize()
|
|||
return l;
|
||||
}
|
||||
|
||||
inline ostream& operator<<(ostream& out, const Vec3& v)
|
||||
inline std::ostream& operator<<(std::ostream& out, const Vec3& v)
|
||||
{
|
||||
return out << "[" << v[0] << " " << v[1] << " " << v[2] << "]";
|
||||
}
|
||||
|
||||
inline istream& operator>>(istream& in, Vec3& v)
|
||||
inline std::istream& operator>>(std::istream& in, Vec3& v)
|
||||
{
|
||||
char c;
|
||||
return in >> c >> v[0] >> v[1] >> v[2] >> c;
|
||||
|
|
|
@ -27,9 +27,9 @@ char *output_filename = NULL;
|
|||
char *mask_filename = NULL;
|
||||
char *script_filename = NULL;
|
||||
|
||||
static char *options = "e:n:p:h:o:m:s:";
|
||||
static const char *options = "e:n:p:h:o:m:s:";
|
||||
|
||||
static char *usage_string =
|
||||
static const char *usage_string =
|
||||
"-e <thresh> Sets the tolerable error threshold\n"
|
||||
"-n <count> Sets the *minimum* number of points regardless of <thresh>\n"
|
||||
"-p <count> Sets the maximum number of allowable points\n"
|
||||
|
@ -41,7 +41,7 @@ static char *usage_string =
|
|||
"-s <file> Execute preinsertion script from <file>\n"
|
||||
"\n";
|
||||
|
||||
static void usage_error(char *msg = NULL)
|
||||
static void usage_error(const char *msg = NULL)
|
||||
{
|
||||
if( msg )
|
||||
cerr << msg << endl;
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* Yes, here it is. A bunch of nice overloaded routines to make it
|
||||
|
@ -164,19 +160,19 @@ inline void glToPPM(FILE *out)
|
|||
}
|
||||
#endif
|
||||
|
||||
inline ostream& operator<<(ostream& out,const gfxPixel& p)
|
||||
inline std::ostream& operator<<(std::ostream& out, const gfxPixel& p)
|
||||
{
|
||||
return out << p.channel.r << p.channel.g << p.channel.b;
|
||||
}
|
||||
|
||||
inline void glToPPM(ostream& out)
|
||||
inline void glToPPM(std::ostream& out)
|
||||
{
|
||||
int x,y,w,h;
|
||||
|
||||
glGetViewport(&x, &y, &w, &h);
|
||||
gfxPixel *data = glSnapshot(x,y,w,h);
|
||||
|
||||
out << "P6 " << w <<" "<< h << " 255" << endl;
|
||||
out << "P6 " << w <<" "<< h << " 255" << std::endl;
|
||||
int i,j;
|
||||
for(j=h-1;j>=0;j--)
|
||||
for(i=0;i<w;i++)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "terra.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using std::istream;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "Map.h"
|
||||
#include "Mask.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace Terra {
|
||||
|
||||
extern GreedySubdivision *mesh;
|
||||
|
@ -23,15 +25,15 @@ extern char *script_filename;
|
|||
extern int goal_not_met();
|
||||
extern void greedy_insertion();
|
||||
extern void display_greedy_insertion(void (*callback)());
|
||||
extern void scripted_preinsertion(istream&);
|
||||
extern void scripted_preinsertion(std::istream&);
|
||||
extern void subsample_insertion(int target_width);
|
||||
|
||||
extern void generate_output(char *filename=NULL,
|
||||
FileFormat format=NULLfile);
|
||||
extern void output_tin(ostream&);
|
||||
extern void output_eps(ostream&);
|
||||
extern void output_obj(ostream&);
|
||||
extern void output_dem(ostream&);
|
||||
extern void output_tin(std::ostream&);
|
||||
extern void output_eps(std::ostream&);
|
||||
extern void output_obj(std::ostream&);
|
||||
extern void output_dem(std::ostream&);
|
||||
|
||||
extern void process_cmdline(int argc, char **argv);
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <Prep/Terra/Map.h>
|
||||
#include <Prep/Terra/Mask.h>
|
||||
|
||||
using std::istream;
|
||||
|
||||
/*
|
||||
* Benchmark: Processing 800 individual buckets:
|
||||
* terrafit.cc: 52s 48s 48s
|
||||
|
|
Loading…
Add table
Reference in a new issue