Changed return type of getIconBasename() to be a reference.
This commit is contained in:
parent
d3dbc42174
commit
f6fcb9d8da
@ -164,7 +164,7 @@ public:
|
||||
const std::string& getIconURL() const { return m_icon_url; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the name of the icon (i.e. the basename of the url). */
|
||||
const std::string getIconBasename() const { return m_icon_basename; }
|
||||
const std::string& getIconBasename() const { return m_icon_basename; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the name of the addon. */
|
||||
const core::stringw& getDescription() const { return m_description; }
|
||||
|
@ -256,7 +256,7 @@ void AddonsManager::initAddons(const XMLNode *xml)
|
||||
Log::warn(
|
||||
"[AddonsManager] Removing '%s' which is not on the server anymore.\n",
|
||||
m_addons_list.getData()[i].getId().c_str() );
|
||||
std::string icon = m_addons_list.getData()[i].getIconBasename();
|
||||
const std::string &icon = m_addons_list.getData()[i].getIconBasename();
|
||||
std::string icon_file =file_manager->getAddonsFile("icons/"+icon);
|
||||
if(file_manager->fileExists(icon_file))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user