mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Reduce queries to python version
Instead of doing at least 2 queries for python infos, now requires only 1 query (in ideal condition), and the result is cached.
This commit is contained in:
@@ -58,7 +58,7 @@ namespace Utils
|
||||
|
||||
template <typename ... Other>
|
||||
constexpr Version(Other ... components)
|
||||
: m_components {{components ...}}
|
||||
: m_components {{static_cast<T>(components) ...}}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -129,6 +129,11 @@ namespace Utils
|
||||
return res;
|
||||
}
|
||||
|
||||
constexpr bool isValid() const
|
||||
{
|
||||
return (*this != ThisType {});
|
||||
}
|
||||
|
||||
constexpr bool operator==(const ThisType &other) const
|
||||
{
|
||||
return (m_components == other.m_components);
|
||||
|
||||
Reference in New Issue
Block a user