]> git.mxchange.org Git - flightgear.git/commitdiff
Erik Hofman:
authorcurt <curt>
Tue, 11 Feb 2003 20:26:42 +0000 (20:26 +0000)
committercurt <curt>
Tue, 11 Feb 2003 20:26:42 +0000 (20:26 +0000)
Adds some small updates to the sound code (add vector clearing in destructors).

src/Sound/fg_fx.cxx
src/Sound/fg_sound.cxx
src/Sound/fg_sound.hxx

index c7c7a17d7ce9a799953f9e59922c867fda425a83..527a5f3a497db67a6099e5e223c0b88feb20ffa3 100644 (file)
@@ -45,8 +45,7 @@ FGFX::FGFX ()
 
 FGFX::~FGFX ()
 {
-   for (unsigned int i = 0; i < _sound.size(); i++ )
-      delete _sound[i];
+   _sound.clear();
 }
 
 void
index 9f20d3b6d974c9615c9aba1f0de06418f3fb50f7..9f76ce0aca6d6034fd0ae5aea9698d4bb8224950 100644 (file)
@@ -83,6 +83,9 @@ FGSound::~FGSound()
    if (_condition)
       delete _condition;
 
+   _volume.clear();
+   _pitch.clear();
+
    delete _sample;
 }
 
index ce66e13a3dbdd985c3f9c41313e4a0f0ca8b0e80..4d4824bb4ef8ee896aa1a4205a1770a0c5a85875 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "soundmgr.hxx"
 
-static const double MAX_TRANSIT_TIME = 0.1;    // 10 ms.
+static const double MAX_TRANSIT_TIME = 0.1;    // 100 ms.
 
 
 /**