Skip to content

Commit

Permalink
Make QT5 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
PacketFiend committed Oct 14, 2023
1 parent ba84143 commit 51a5ce3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions igc.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ class IgcFormat : public Format
ext_rec_acz = 10, // Z Acceleration
};

// Qt5 doesn't have a qHash function for scoped enumerations.
// Qt6 falls back to std::hash, but it may not use the seed.
friend qhash_result_t qHash(const igc_ext_type_t& key, qhash_result_t seed = 0) noexcept
{
return qHash(static_cast<std::underlying_type<igc_ext_type_t>::type>(key), seed);
}

QVector<arglist_t>* get_args() override
{
return &igc_args;
Expand Down
2 changes: 1 addition & 1 deletion reference/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Options:



[Press enter]
[Press enter]

0 comments on commit 51a5ce3

Please sign in to comment.