Files
test/source/gameengine/Expressions
Campbell Barton fcc23faa3a Added getitem/setitem access for KX_GameObject
ob.someProp = 10
can now be...
ob["someProp"] = 10

For simple get/set test with an objects 10 properties, this is ~30% faster.

Though I like the attribute access, its slower because it needs to lookup BGE attributes and methods (for parent classes as well as KX_GameObject class).

This could also be an advantage if there are collisions between new attributes added for 2.49 and existing properties a game uses.

Made some other small optimizations,
- Getting and setting property can use const char* as well as STR_String (avoids making new STR_Strings just to do the lookup).
- CValue::SetPropertiesModified() and CValue::SetPropertiesModified(), were looping through all items in the std::map, advancing from the beginning each time.
2009-04-02 05:38:05 +00:00
..
2002-11-25 15:29:57 +00:00
2002-11-25 15:29:57 +00:00
2002-11-25 15:29:57 +00:00
2002-11-25 15:29:57 +00:00
2002-11-25 15:29:57 +00:00
2009-02-26 09:04:06 +00:00
2009-02-23 06:41:10 +00:00
2002-11-25 15:29:57 +00:00
2009-02-15 23:26:00 +00:00
2002-11-25 15:29:57 +00:00
2002-11-25 15:29:57 +00:00