Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/gui/shellwidget/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ int GetHorizontalAdvance(const QFontMetrics& fm, QChar character) noexcept;
int GetHorizontalAdvance(const QFontMetrics& fm, const QString& text) noexcept;

bool saveShellContents(const ShellContents& s, const QString& filename);

/// Check if `index` is valid and within the bounds of `container`.
template<class T>
inline bool IsValidIndex(const T& container, int index) noexcept
{
return index >= 0 && index < container.size();
}
Loading