quote:Original post by Fruny
a) you have an infinite loop in your unary operator.
Yes I do. forgot "str++". It was correct in the original though.
quote:Original post by Fruny
b) you should not try to replace the hash_compare class, but pass it a custom comparison predicate.
If I do that then the hash key dosnt get hashed properly. It just gets cast to a size_t. So I would have make the function
"operator size_t ( const char* p );" Either that or me no get what you're saying.
quote:
Before VS.NET 2003, hash_map was in std, even though it is not (yet) standard. Change the code accordingly.
ok. thanks
quote:
Additionally, I strongly suggest you use std::string instead of char* as the map's key. It will safe you much grief
Actually thats what I did at first. But the framerate seems to increase dramatically if I use char pointers instead. In the main game loop all I was doing was
Texture* p1 = TextureMgr["Font.tga"];
Texture* p2 = TextureMgr["Ariel"];
Blit( x, y, p1 );
Blit( x, y, p2 );
When I uses std::string as the key I would get an ok frame rate, then when i used const char* instead, the frame rate shot up 10 times higher.
thanks for replies
[edit] quote insanity [/edit]
:::: [ Triple Buffer V2.0 ] ::::
[edited by - ifoobar on July 10, 2003 8:18:46 AM]