fixed warning
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
b0a21c9389
commit
440afcedb0
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