gnash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash] container.h changes


From: Jim Garrison
Subject: [Gnash] container.h changes
Date: Sat, 11 Feb 2006 23:04:15 -0500
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Hello

Earlier this evening I committed some code that removes the custom implementation of the array class in container.h, and makes it use std::vector instead. I also removed the additional functions that std::vector does not have, and fixed various things in the code to be compatible with std::vector. If nothing is seriously broken, we can soon replace every reference to "array" by "std::vector."

The most immediate problem is as follows: the old array::size() function returned an integer, but the std::vector::size() function returns size_type, which is unsigned on all platforms that I know of. In many instances, this creates a situation where a signed value is compared to an unsigned value. Not only does this make the compiler spit out a bunch of warnings, but it also caused at least one assertion to fail in the code. That assertion is fixed, but if you notice any weird behavior, you may wish to uncomment line 165 of libbase/container.h, which implements an integer size() function as well. Over the next few days I plan to go through each comparison between an integer variable and a size_type variable to get rid of the warnings and make sure nothing bad happens.

Jim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]