| [Freeciv-Dev] Re: very simple specvecs[Top] [All Lists][Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
 On Sat, May 15, 2004 at 02:13:50AM -0400, Jason Dorje Short wrote:
> It would be possible to make the specvec a simple array.
>   {
>     foo_vector foo;
> 
>     foo_vector_init(&foo);
>     foo_vector_reserve(&foo, 2);
> 
>     foo[0].a = 1;
>     foo[0].b = 2;
>     foo[1].a = 2;
>     foo[1].b = 4;
With this syntax we loose the ability to do bounds checking.
        Raimar
-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Premature optimization is the root of all evil."
    -- D. E. Knuth in "Structured Programming with go to Statements"
 
 |  |