Changed some shared_ptr return values to use values instead of references.

This commit is contained in:
Leon Styhre 2022-01-04 22:36:15 +01:00
parent 0cbcb7a516
commit 87ace0b8cb
5 changed files with 5 additions and 5 deletions

View file

@ -91,7 +91,7 @@ public:
mEnvData->mPlatformIds.cend();
}
const std::shared_ptr<ThemeData>& getTheme() const { return mTheme; }
const std::shared_ptr<ThemeData> getTheme() const { return mTheme; }
std::string getGamelistPath(bool forWrite) const;
std::string getThemePath() const;

View file

@ -98,7 +98,7 @@ public:
void onFocusGained() override { mGrid.onFocusGained(); }
void onFocusLost() override { mGrid.onFocusLost(); }
std::shared_ptr<ComponentList>& getResultList() { return mResultList; }
std::shared_ptr<ComponentList> getResultList() { return mResultList; }
private:
void updateViewStyle();

View file

@ -30,7 +30,7 @@ public:
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) = 0;
void setTheme(const std::shared_ptr<ThemeData>& theme);
const std::shared_ptr<ThemeData>& getTheme() const { return mTheme; }
const std::shared_ptr<ThemeData> getTheme() const { return mTheme; }
virtual void preloadGamelist(){};

View file

@ -607,7 +607,7 @@ const ThemeData::ThemeElement* ThemeData::getElement(const std::string& view,
return &elemIt->second;
}
const std::shared_ptr<ThemeData>& ThemeData::getDefault()
const std::shared_ptr<ThemeData> ThemeData::getDefault()
{
static std::shared_ptr<ThemeData> theme = nullptr;
if (theme == nullptr) {

View file

@ -199,7 +199,7 @@ public:
const std::string& view,
Window* window);
static const std::shared_ptr<ThemeData>& getDefault();
static const std::shared_ptr<ThemeData> getDefault();
static std::map<std::string, ThemeSet> getThemeSets();
static std::string getThemeFromCurrentSet(const std::string& system);