From: Harald JOHNSEN Date: Tue, 29 May 2012 17:59:54 +0000 (+0200) Subject: remove some warnings for MSVC X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aae77a7983b744827fd11ce748965b0497292bed;p=simgear.git remove some warnings for MSVC don't start to play sounds that are out of range of the listener --- diff --git a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx index 5de1b5cc..9404e437 100644 --- a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx +++ b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx @@ -293,7 +293,7 @@ public: points.push_back(std::make_pair(randomPoint, img->getColor(x,y).r())); } } else { - points.push_back(std::make_pair(randomPoint, mt_rand(&seed))); + points.push_back(std::make_pair(randomPoint, static_cast(mt_rand(&seed)))); } } num -= 1.0; diff --git a/simgear/sound/sample_group.cxx b/simgear/sound/sample_group.cxx index b0ddab8a..6b2d8566 100644 --- a/simgear/sound/sample_group.cxx +++ b/simgear/sound/sample_group.cxx @@ -134,7 +134,7 @@ void SGSampleGroup::update( double dt ) { for ( ; sample_current != sample_end; ++sample_current ) { SGSoundSample *sample = sample_current->second; - if ( !sample->is_valid_source() && sample->is_playing() ) { + if ( !sample->is_valid_source() && sample->is_playing() && !sample->test_out_of_range()) { // // a request to start playing a sound has been filed. //