Reduce compiler.h to almost nothing (but it's worth keeping around I think, for

the MSVC and MipsPro warning stuff).

As a result of this patch, simgear/sg_traits.h can be deleted. So can SGCMath.h,
but I'll do that separately.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another mechnica
l change, replacing <math.h> with <cmath> and so on *everywhere*, but one step a
t a time)
This commit is contained in:
ehofman
2008-07-25 18:35:40 +00:00
parent cd72eb20c6
commit 733e6fa14f
81 changed files with 122 additions and 450 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
#include <sys/types.h>
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <simgear/math/sg_types.hxx>
+2 -8
View File
@@ -21,15 +21,9 @@
// $Id$
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <ctype.h> // isspace()
#ifdef SG_HAVE_STD_INCLUDES
# include <cerrno>
#else
# include <errno.h>
#endif
#include <cerrno>
#include "sgstream.hxx"
+1 -1
View File
@@ -35,7 +35,7 @@
# include <istream>
#include STL_STRING
#include <string>
#include <simgear/misc/zfstream.hxx>
+2 -6
View File
@@ -29,16 +29,12 @@
#include <simgear/compiler.h>
#include STL_STRING
#include <string>
#include <vector>
SG_USING_STD(vector);
#ifdef SG_HAVE_STD_INCLUDES
# include <cstdlib>
#else
# include <stdlib.h>
#endif
#include <cstdlib>
SG_USING_STD(string);
+1 -1
View File
@@ -26,7 +26,7 @@
#include <simgear/compiler.h>
#include <vector>
#include STL_STRING
#include <string>
SG_USING_STD(vector);
SG_USING_STD(string);
+1 -1
View File
@@ -4,7 +4,7 @@
#include <simgear/compiler.h>
#include STL_IOSTREAM
#include <iostream>
#include "tabbed_values.hxx"
SG_USING_STD(cout);
+1 -1
View File
@@ -145,7 +145,7 @@ enter this in the official comments in case I forget again. :-)
#include <simgear/compiler.h>
// #include STL_IOSTREAM
// #include <iostream>
#include "texcoord.hxx"
+1 -5
View File
@@ -23,11 +23,7 @@
#include <simgear/compiler.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <cerrno>
#else
# include <errno.h>
#endif
#include <cerrno>
#include <memory.h>
#include <stdio.h>
+11 -54
View File
@@ -31,51 +31,20 @@
#include <zlib.h>
#ifdef SG_HAVE_STD_INCLUDES
# include <streambuf>
# include <istream>
#include <streambuf>
#include <istream>
# define ios_openmode std::ios_base::openmode
# define ios_in std::ios_base::in
# define ios_out std::ios_base::out
# define ios_app std::ios_base::app
# define ios_binary std::ios_base::binary
#define ios_openmode std::ios_base::openmode
#define ios_in std::ios_base::in
#define ios_out std::ios_base::out
#define ios_app std::ios_base::app
#define ios_binary std::ios_base::binary
# define ios_seekdir std::ios_base::seekdir
#define ios_seekdir std::ios_base::seekdir
# define ios_badbit std::ios_base::badbit
# define ios_failbit std::ios_base::failbit
#else
# ifdef SG_HAVE_STREAMBUF
# include <streambuf.h>
# include <istream.h>
# else
# include <iostream.h>
# endif
//# define ios_openmode ios::open_mode
# define ios_openmode int
# define ios_in ios::in
# define ios_out ios::out
# define ios_app ios::app
#if defined(__GNUC__) && __GNUC_MINOR__ < 8
# define ios_binary ios::bin
#else
# define ios_binary ios::binary
#endif
# define ios_seekdir ios::seek_dir
# define ios_badbit ios::badbit
# define ios_failbit ios::failbit
# include <simgear/sg_traits.hxx>
#endif // SG_HAVE_STD_INCLUDES
#define ios_badbit std::ios_base::badbit
#define ios_failbit std::ios_base::failbit
/**
* A C++ I/O streams interface to the zlib gz* functions.
@@ -87,14 +56,6 @@ class gzfilebuf : public std::streambuf
#endif
{
public:
#ifndef SG_HAVE_STD_INCLUDES
typedef char_traits<char> traits_type;
typedef char_traits<char>::int_type int_type;
// typedef char_traits<char>::pos_type pos_type;
// typedef char_traits<char>::off_type off_type;
#endif
/** Constructor */
gzfilebuf();
@@ -135,12 +96,8 @@ public:
protected:
virtual int_type underflow();
#ifndef SG_HAVE_STD_INCLUDES
virtual int_type overflow( int_type c = traits_type::eof() );
#else
virtual int_type overflow( int_type c = std::streambuf::traits_type::eof() );
#endif
virtual int_type overflow( int_type c = traits_type::eof() );
private:
int_type flushbuf();