mirror of https://github.com/stella-emu/stella.git
Fix minor warnings from clang-13.
This commit is contained in:
parent
1f8666bde5
commit
88742d93ef
|
@ -216,6 +216,7 @@ void FavoritesManager::addRecent(const string& path)
|
|||
myRecentList.erase(myRecentList.begin());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FavoritesManager::removeRecent(const string& path)
|
||||
{
|
||||
auto it = std::find(myRecentList.begin(), myRecentList.end(), path);
|
||||
|
@ -260,6 +261,7 @@ const FavoritesManager::RecentList& FavoritesManager::recentList() const
|
|||
return sortedList;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool FavoritesManager::removePopular(const string& path)
|
||||
{
|
||||
return myPopularMap.erase(path);
|
||||
|
|
|
@ -155,6 +155,7 @@ void FileListWidget::getChildren(const FilesystemNode::CancelCheck& isCancelled)
|
|||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
FileListWidget::IconType FileListWidget::getIconType(const string& path) const
|
||||
{
|
||||
const FilesystemNode node(path);
|
||||
|
@ -239,6 +240,7 @@ bool FileListWidget::hasNextHistory()
|
|||
return _currentHistory != std::prev(_history.end(), 1);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string& FileListWidget::fixPath(string& path)
|
||||
{
|
||||
if(path.back() == FilesystemNode::PATH_SEPARATOR)
|
||||
|
|
|
@ -27,8 +27,8 @@ namespace GUI {
|
|||
|
||||
struct IconDesc
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
int width{0};
|
||||
int height{0};
|
||||
|
||||
explicit IconDesc(int _width, int _height)
|
||||
: width{_width}, height{_height} {}
|
||||
|
|
|
@ -527,4 +527,5 @@ static const Icon icon_help_large(
|
|||
});
|
||||
|
||||
} // namespace GUI
|
||||
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,7 @@ class NavigationWidget : public Widget
|
|||
public:
|
||||
FolderLinkWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int w, int h, const string& text, const string& path);
|
||||
~FolderLinkWidget() = default;
|
||||
~FolderLinkWidget() override = default;
|
||||
|
||||
void setPath(const string& path) { myPath = path; }
|
||||
const string& getPath() const { return myPath; }
|
||||
|
@ -63,7 +63,7 @@ class NavigationWidget : public Widget
|
|||
public:
|
||||
PathWidget(GuiObject* boss, CommandReceiver* target,
|
||||
const GUI::Font& font, int x, int y, int w, int h);
|
||||
~PathWidget() = default;
|
||||
~PathWidget() override = default;
|
||||
|
||||
void setPath(const string& path);
|
||||
const string& getPath(int idx) const;
|
||||
|
@ -78,7 +78,7 @@ class NavigationWidget : public Widget
|
|||
: path{_path}, widget{_widget} {}
|
||||
};
|
||||
std::vector<FolderLinkWidget*> myFolderList;
|
||||
CommandReceiver* myTarget;
|
||||
CommandReceiver* myTarget{nullptr};
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
@ -92,7 +92,7 @@ class NavigationWidget : public Widget
|
|||
public:
|
||||
NavigationWidget(GuiObject* boss, const GUI::Font& font,
|
||||
int x, int y, int w, int h);
|
||||
~NavigationWidget() = default;
|
||||
~NavigationWidget() override = default;
|
||||
|
||||
void setWidth(int w) override;
|
||||
void setList(FileListWidget* list);
|
||||
|
|
Loading…
Reference in New Issue