Twitter | Pretraživanje | |
Richard Geldreich
At the very last minute, the Halo Wars 1 (Xbox 360) developers changed the custom std::vector container equivalent (likely used in thousands of places in the code) to do range checking on *all* operator[]'s. This shipped.
Reply Retweet Označi sa "sviđa mi se" More
Richard Geldreich 28. sij
Odgovor korisniku/ci @richgel999
So *every* access to our dynamic arrays was range checked. I wrote the containers and didn't think this would fly, but it did. (I didn't make the range check change.)
Reply Retweet Označi sa "sviđa mi se"
Richard Geldreich 28. sij
Odgovor korisniku/ci @richgel999
There were some hard to find bugs near the end, and it was better to have deterministic behavior (just return the first or last element on invalid array indices) vs. going wild and accessing uninitialized/random memory.
Reply Retweet Označi sa "sviđa mi se"