Consolidated some loose strings into constant declarations in order to reduce allocation thrashing on temporary string constructs. I'm sure there are more, but "back_thumb", "back", and "backdrop.jpg" were the ones that showed up most in memory profiling.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "GameObserver.h"
|
||||
#include "Rules.h"
|
||||
|
||||
const std::string kBackdropFile = "backdrop.jpg";
|
||||
|
||||
GuiBackground::GuiBackground()
|
||||
{
|
||||
}
|
||||
@@ -24,7 +26,7 @@ void GuiBackground::Render()
|
||||
}
|
||||
if (!quad.get())
|
||||
{
|
||||
quad = WResourceManager::Instance()->RetrieveTempQuad("backdrop.jpg");
|
||||
quad = WResourceManager::Instance()->RetrieveTempQuad(kBackdropFile);
|
||||
}
|
||||
if (quad.get())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user