mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
fixed warning
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
(cherry picked from commit 440afcedb0)
This commit is contained in:
parent
5aa3aabdf9
commit
1389b74a8a
2 changed files with 21 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "JavaInstall.h"
|
||||
|
||||
#include "BaseVersion.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
bool JavaInstall::operator<(const JavaInstall& rhs)
|
||||
|
|
@ -43,3 +44,21 @@ bool JavaInstall::operator>(const JavaInstall& rhs)
|
|||
{
|
||||
return (!operator<(rhs)) && (!operator==(rhs));
|
||||
}
|
||||
|
||||
bool JavaInstall::operator<(BaseVersion& a)
|
||||
{
|
||||
try {
|
||||
return operator<(dynamic_cast<JavaInstall&>(a));
|
||||
} catch (const std::bad_cast& e) {
|
||||
return BaseVersion::operator<(a);
|
||||
}
|
||||
}
|
||||
|
||||
bool JavaInstall::operator>(BaseVersion& a)
|
||||
{
|
||||
try {
|
||||
return operator>(dynamic_cast<JavaInstall&>(a));
|
||||
} catch (const std::bad_cast& e) {
|
||||
return BaseVersion::operator>(a);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue