Code cleanups.
(no functionality change)
This commit is contained in:
parent
081aafb914
commit
a8d7645004
@ -60,18 +60,6 @@
|
||||
using namespace simgear;
|
||||
using namespace osg;
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define isnan(x) _isnan(x)
|
||||
#endif
|
||||
|
||||
// #if defined (__FreeBSD__)
|
||||
// # if __FreeBSD_version < 500000
|
||||
// extern "C" {
|
||||
// inline int isnan(double r) { return !(r <= 0 || r >= 0); }
|
||||
// }
|
||||
// # endif
|
||||
// #endif
|
||||
|
||||
static osg::ref_ptr<osg::StateSet> layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES];
|
||||
static osg::ref_ptr<osg::StateSet> layer_states2[SGCloudLayer::SG_MAX_CLOUD_COVERAGES];
|
||||
static osg::ref_ptr<osg::TextureCubeMap> cubeMap;
|
||||
@ -735,7 +723,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon,
|
||||
// this happens, lets just use the last known good course.
|
||||
// This is a hack, and it would probably be better to make
|
||||
// calc_gc_course_dist() more robust.
|
||||
if ( isnan(course) ) {
|
||||
if ( isNaN(course) ) {
|
||||
course = last_course;
|
||||
} else {
|
||||
last_course = course;
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <simgear/structure/SGReferenced.hxx>
|
||||
|
||||
#include <string>
|
||||
using std::string;
|
||||
|
||||
#include <osg/ref_ptr>
|
||||
#include <osg/Array>
|
||||
@ -74,7 +73,7 @@ public:
|
||||
* Constructor
|
||||
* @param tex_path the path to the set of cloud textures
|
||||
*/
|
||||
SGCloudLayer( const string &tex_path );
|
||||
SGCloudLayer( const std::string &tex_path );
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
@ -141,16 +140,16 @@ public:
|
||||
void setCoverage (Coverage coverage);
|
||||
|
||||
/** get coverage as string */
|
||||
const string & getCoverageString() const;
|
||||
const std::string & getCoverageString() const;
|
||||
|
||||
/** get coverage as string */
|
||||
static const string & getCoverageString( Coverage coverage );
|
||||
static const std::string & getCoverageString( Coverage coverage );
|
||||
|
||||
/** get coverage type from string */
|
||||
static Coverage getCoverageType( const std::string & coverage );
|
||||
|
||||
/** set coverage as string */
|
||||
void setCoverageString( const string & coverage );
|
||||
void setCoverageString( const std::string & coverage );
|
||||
|
||||
/**
|
||||
* set the cloud movement direction
|
||||
|
@ -51,18 +51,6 @@ using std::vector;
|
||||
#include "newcloud.hxx"
|
||||
#include "cloudfield.hxx"
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
#define isnan(x) _isnan(x)
|
||||
#endif
|
||||
|
||||
#if defined (__FreeBSD__)
|
||||
# if __FreeBSD_version < 500000
|
||||
extern "C" {
|
||||
inline int isnan(double r) { return !(r <= 0 || r >= 0); }
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
using namespace simgear;
|
||||
|
||||
float SGCloudField::fieldSize = 50000.0f;
|
||||
|
@ -293,7 +293,7 @@ void SGSky::set_3dCloudUseImpostors(bool imp)
|
||||
SGCloudField::setUseImpostors(imp);
|
||||
}
|
||||
|
||||
void SGSky::texture_path( const string& path ) {
|
||||
void SGSky::texture_path( const std::string& path ) {
|
||||
tex_path = SGPath( path );
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ public:
|
||||
* Specify the texture path (optional, defaults to current directory)
|
||||
* @param path base path to texture locations
|
||||
*/
|
||||
void texture_path( const string& path );
|
||||
void texture_path( const std::string& path );
|
||||
|
||||
/**
|
||||
* Get the current sun color
|
||||
|
Loading…
Reference in New Issue
Block a user