On Fri, Jul 27, 2007 at 03:09:42PM +0000, Tomas Groth wrote:

> +unsigned int GST_sound_handler::get_duration(int sound_handle)
> +{
> +     mutex::scoped_lock lock(_mutex);
> +
> +     // Check if the sound exists.
> +     if (sound_handle < 0 || (unsigned int) sound_handle >= 
> m_sound_data.size())
> +     {
> +             // Invalid handle.
> +             return 0;
> +     }
> +
> +     sound_data* sounddata = m_sound_data[sound_handle];

Could we substitute the above block with a getSoundData(int sound_handle) ?
The getSoundData function would return NULL if the handle is invalid, and we'd 
have
a single implementation rather then duplicated ones (see duplication in 
get_position,
and in both SDL and GST versions).

--strk;


_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit

Reply via email to