mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Fix error 'call of overloaded ... is ambiguous'
With Qt 5.9, I got an error when calling compare(BlackMisc::Network::CEntityFlags::Entity, BlackMisc::Network::CEntityFlags::Entity). The underlying integral type of an enum is implementation defined and gcc seem to choose an unsigned int in this case. This made the call ambiguous, since there was no unsigned int overload yet of compare.
This commit is contained in:
committed by
Mathew Sutcliffe
parent
2ab7071423
commit
11d641bb97
@@ -26,6 +26,12 @@ namespace BlackMisc
|
||||
return a < b ? -10 : 10;
|
||||
}
|
||||
|
||||
int compare(uint a, uint b)
|
||||
{
|
||||
if (a == b) return 0;
|
||||
return a < b ? -10 : 10;
|
||||
}
|
||||
|
||||
int compare(qint64 a, qint64 b)
|
||||
{
|
||||
if (a == b) return 0;
|
||||
|
||||
Reference in New Issue
Block a user