c++ : Peer review if anyone would be so kind and/or is bored:)
Why is FindSubNode member of loader, and not node? It has nothing to do with Collada, but everything with XML node. It would make implementation somewhat simpler.
Quote:Original post by Antheus
Why is FindSubNode member of loader, and not node? It has nothing to do with Collada, but everything with XML node. It would make implementation somewhat simpler.
I was just thinking that myself when i was adding it :), not a big deal i can move it, this was actually more a means to something else but i wanted to have it check over by the good people here :p
Also guys thanks for bringing up the Size() operation that info is good to have, :)
also the const string was good advice thanks. I really do need to make my code more strict.
Quote:
Hmm, fair point. It just seems to me that size() is a much more common function to see in code than splice(). Then again, maybe it's just the code I see
If you have chosen to use a std::list, then probably you are not interested in size(), but interested in the relinking capabilities (e.g splice) - e.g moving a whole list onto another one if the original is not needed any more.
In any case, if you mean to test if a container is empty (or not empty), empty() conveys the meaning better and is performance-wise faster than or equal to size().
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement