fix warnings in Main
This commit is contained in:
parent
67c7d8642a
commit
0a64405cad
7 changed files with 7 additions and 18 deletions
|
@ -298,7 +298,6 @@ CameraInfo* CameraGroup::buildCamera(SGPropertyNode* cameraNode)
|
||||||
WindowBuilder *wBuild = WindowBuilder::getWindowBuilder();
|
WindowBuilder *wBuild = WindowBuilder::getWindowBuilder();
|
||||||
const SGPropertyNode* windowNode = cameraNode->getNode("window");
|
const SGPropertyNode* windowNode = cameraNode->getNode("window");
|
||||||
GraphicsWindow* window = 0;
|
GraphicsWindow* window = 0;
|
||||||
static int cameraNum = 0;
|
|
||||||
int cameraFlags = DO_INTERSECTION_TEST;
|
int cameraFlags = DO_INTERSECTION_TEST;
|
||||||
if (windowNode) {
|
if (windowNode) {
|
||||||
// New style window declaration / definition
|
// New style window declaration / definition
|
||||||
|
@ -400,7 +399,6 @@ CameraInfo* CameraGroup::buildGUICamera(SGPropertyNode* cameraNode,
|
||||||
const SGPropertyNode* windowNode = (cameraNode
|
const SGPropertyNode* windowNode = (cameraNode
|
||||||
? cameraNode->getNode("window")
|
? cameraNode->getNode("window")
|
||||||
: 0);
|
: 0);
|
||||||
static int cameraNum = 0;
|
|
||||||
if (!window) {
|
if (!window) {
|
||||||
if (windowNode) {
|
if (windowNode) {
|
||||||
// New style window declaration / definition
|
// New style window declaration / definition
|
||||||
|
|
|
@ -187,7 +187,7 @@ FGIO::parse_port_config( const string& config )
|
||||||
FGRUL *rul = new FGRUL;
|
FGRUL *rul = new FGRUL;
|
||||||
io = rul;
|
io = rul;
|
||||||
} else if ( protocol == "generic" ) {
|
} else if ( protocol == "generic" ) {
|
||||||
int configToken;
|
size_t configToken;
|
||||||
if (tokens[1] == "socket") {
|
if (tokens[1] == "socket") {
|
||||||
configToken = 7;
|
configToken = 7;
|
||||||
} else if (tokens[1] == "file") {
|
} else if (tokens[1] == "file") {
|
||||||
|
|
|
@ -79,9 +79,6 @@ static osg::ref_ptr<osg::Camera> mainCamera;
|
||||||
|
|
||||||
void fgOSOpenWindow(bool stencil)
|
void fgOSOpenWindow(bool stencil)
|
||||||
{
|
{
|
||||||
osg::GraphicsContext::WindowingSystemInterface* wsi
|
|
||||||
= osg::GraphicsContext::getWindowingSystemInterface();
|
|
||||||
|
|
||||||
viewer = new osgViewer::Viewer;
|
viewer = new osgViewer::Viewer;
|
||||||
viewer->setDatabasePager(FGScenery::getPagerSingleton());
|
viewer->setDatabasePager(FGScenery::getPagerSingleton());
|
||||||
CameraGroup* cameraGroup = 0;
|
CameraGroup* cameraGroup = 0;
|
||||||
|
|
|
@ -72,8 +72,6 @@ static void dumpOut(osg::Node* node)
|
||||||
char filename[24];
|
char filename[24];
|
||||||
static int count = 1;
|
static int count = 1;
|
||||||
|
|
||||||
FGRenderer *renderer = globals->get_renderer();
|
|
||||||
|
|
||||||
while (count < 1000) {
|
while (count < 1000) {
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
snprintf(filename, 24, "fgviewer-%03d.osg", count++);
|
snprintf(filename, 24, "fgviewer-%03d.osg", count++);
|
||||||
|
|
|
@ -67,6 +67,9 @@ FGGlobals *globals;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
FGGlobals::FGGlobals() :
|
FGGlobals::FGGlobals() :
|
||||||
|
props( new SGPropertyNode ),
|
||||||
|
initial_state( NULL ),
|
||||||
|
locale( NULL ),
|
||||||
renderer( new FGRenderer ),
|
renderer( new FGRenderer ),
|
||||||
subsystem_mgr( new SGSubsystemMgr ),
|
subsystem_mgr( new SGSubsystemMgr ),
|
||||||
event_mgr( new SGEventMgr ),
|
event_mgr( new SGEventMgr ),
|
||||||
|
@ -85,9 +88,6 @@ FGGlobals::FGGlobals() :
|
||||||
AI_mgr( NULL ),
|
AI_mgr( NULL ),
|
||||||
controls( NULL ),
|
controls( NULL ),
|
||||||
viewmgr( NULL ),
|
viewmgr( NULL ),
|
||||||
props( new SGPropertyNode ),
|
|
||||||
initial_state( NULL ),
|
|
||||||
locale( NULL ),
|
|
||||||
commands( SGCommandMgr::instance() ),
|
commands( SGCommandMgr::instance() ),
|
||||||
acmodel( NULL ),
|
acmodel( NULL ),
|
||||||
model_mgr( NULL ),
|
model_mgr( NULL ),
|
||||||
|
|
|
@ -996,7 +996,7 @@ fgOptRandomWind( const char *arg )
|
||||||
static int
|
static int
|
||||||
fgOptWind( const char *arg )
|
fgOptWind( const char *arg )
|
||||||
{
|
{
|
||||||
double min_hdg, max_hdg, speed, gust;
|
double min_hdg = 0.0, max_hdg = 0.0, speed = 0.0, gust = 0.0;
|
||||||
if (!parse_wind( arg, &min_hdg, &max_hdg, &speed, &gust)) {
|
if (!parse_wind( arg, &min_hdg, &max_hdg, &speed, &gust)) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << arg );
|
SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << arg );
|
||||||
return FG_OPTIONS_ERROR;
|
return FG_OPTIONS_ERROR;
|
||||||
|
@ -1815,9 +1815,9 @@ unsigned int getNumMaturity(const char * str)
|
||||||
{
|
{
|
||||||
// changes should also be reflected in $FG_ROOT/data/options.xml &
|
// changes should also be reflected in $FG_ROOT/data/options.xml &
|
||||||
// $FG_ROOT/data/Translations/string-default.xml
|
// $FG_ROOT/data/Translations/string-default.xml
|
||||||
const char levels[][20]= {"alpha","beta","early-production","production",0};
|
const char* levels[] = {"alpha","beta","early-production","production"};
|
||||||
|
|
||||||
for (unsigned int i=0; i<(sizeof(levels)/sizeof(levels[0])-1);i++)
|
for (size_t i=0; i<(sizeof(levels)/sizeof(levels[0]));i++)
|
||||||
if (strcmp(str,levels[i])==0)
|
if (strcmp(str,levels[i])==0)
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
|
|
@ -542,9 +542,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
||||||
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
|
SGConfigureDirectionalLights( use_point_sprites, enhanced_lighting,
|
||||||
distance_attenuation );
|
distance_attenuation );
|
||||||
|
|
||||||
static const SGPropertyNode *groundlevel_nearplane
|
|
||||||
= fgGetNode("/sim/current-view/ground-level-nearplane-m");
|
|
||||||
|
|
||||||
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
|
||||||
|
|
||||||
// update fog params
|
// update fog params
|
||||||
|
@ -766,7 +763,6 @@ bool
|
||||||
FGRenderer::pick(std::vector<SGSceneryPick>& pickList,
|
FGRenderer::pick(std::vector<SGSceneryPick>& pickList,
|
||||||
const osgGA::GUIEventAdapter* ea)
|
const osgGA::GUIEventAdapter* ea)
|
||||||
{
|
{
|
||||||
osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
|
|
||||||
// wipe out the return ...
|
// wipe out the return ...
|
||||||
pickList.clear();
|
pickList.clear();
|
||||||
typedef osgUtil::LineSegmentIntersector::Intersections Intersections;
|
typedef osgUtil::LineSegmentIntersector::Intersections Intersections;
|
||||||
|
|
Loading…
Reference in a new issue