1.8 RC1, ResourceManager::_notifyResourceUnloaded bug

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.

1.8 RC1, ResourceManager::_notifyResourceUnloaded bug

Postby MasterD » Sat Feb 11, 2012 4:51 pm

I'm currently compiling 1.8 RC1 and VC spit out a warning to the following code:
Code: Select all
void ResourceManager::_notifyResourceUnloaded(Resource* res)
      mMemoryUsage += -(res->getSize());

getSize returns unsigned, so -(unsigned) stays unsigned (at least for VC9) and memory increases. I have not seen a thread nor a bug on mantis, is this unknown?

just looked at AtomicScalar, the type of mMemoryUsage. It only has a operator +=, I assume a operator -= is needed at that location or a templated version of just the operator +=.
Yet Another Space Shooter --- www.yass-engine.de
Posts: 26
Kudos: 1
Joined: 29 Jun 2010

Return to Developer talk

Who is online

Users browsing this forum: No registered users and 8 guests