I'd also tend to use const CGUIStaticItem &item here - you're not altering the item, and you know it exists, thus mayaswell pass by reference.