Jeck - Cache is using map<> again. The implementation is cleaner and seems a little faster.

This commit is contained in:
wagic.jeck
2009-09-19 23:20:43 +00:00
parent 8cc9bff484
commit 1ba7f108b0
5 changed files with 418 additions and 423 deletions

View File

@@ -21,7 +21,6 @@ public:
virtual unsigned long size()=0; //Size of cached item in bytes.
virtual bool isGood()=0; //Return true if this has data.
virtual bool isLocked(); //Is the resource locked?
virtual bool isTrash(); //Is the resource locked?
virtual void lock(); //Lock it.
virtual void unlock(bool force = false); //Unlock it. Forcing a lock will also remove "permanent" status.
@@ -30,7 +29,6 @@ public:
void hit(); //Update resource's last used time.
protected:
string id; //Our lookup value.
int loadedMode; //What submode settings were we loaded with? (For refresh)
unsigned int lastTime; //When was the last time we were hit?
unsigned char locks; //Remember to unlock when we're done using locked stuff, or else this'll be useless.
@@ -112,7 +110,7 @@ public:
bool compare(hgeParticleSystemInfo * p) {return (p == particles);};
hgeParticleSystemInfo * Actual();
protected:
protected:
hgeParticleSystemInfo * particles;
};