Changeset View
Changeset View
Standalone View
Standalone View
source/lobby/scripting/JSInterface_Lobby.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | #if CONFIG2_LOBBY // Allow the lobby to be disabled | ||||
scriptInterface.RegisterFunction<std::wstring, std::wstring, &JSI_Lobby::LobbyGetPlayerRating>("LobbyGetPlayerRating"); | scriptInterface.RegisterFunction<std::wstring, std::wstring, &JSI_Lobby::LobbyGetPlayerRating>("LobbyGetPlayerRating"); | ||||
scriptInterface.RegisterFunction<std::wstring, std::wstring, std::wstring, &JSI_Lobby::EncryptPassword>("EncryptPassword"); | scriptInterface.RegisterFunction<std::wstring, std::wstring, std::wstring, &JSI_Lobby::EncryptPassword>("EncryptPassword"); | ||||
scriptInterface.RegisterFunction<std::wstring, &JSI_Lobby::LobbyGetRoomSubject>("LobbyGetRoomSubject"); | scriptInterface.RegisterFunction<std::wstring, &JSI_Lobby::LobbyGetRoomSubject>("LobbyGetRoomSubject"); | ||||
#endif // CONFIG2_LOBBY | #endif // CONFIG2_LOBBY | ||||
} | } | ||||
bool JSI_Lobby::HasXmppClient(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate)) | bool JSI_Lobby::HasXmppClient(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate)) | ||||
{ | { | ||||
return g_XmppClient; | return !!g_XmppClient; | ||||
wraitii: What was the warning here? Maybe `!!` instead? | |||||
Done Inline Actionswarning C4800: 'IXmppClient *': forcing value to bool 'true' or 'false' Stan: ```
warning C4800: 'IXmppClient *': forcing value to bool 'true' or 'false'
```
https… | |||||
Done Inline ActionsAccording to https://docs.microsoft.com/fr-fr/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4800?view=msvc-160 this is basically a reverted warning in VS17, and I see why. I'd like you to unchange those conversions to bool, they bring nothing but noise. wraitii: According to https://docs.microsoft.com/fr-fr/cpp/error-messages/compiler-warnings/compiler… | |||||
} | } | ||||
void JSI_Lobby::SetRankedGame(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate), bool isRanked) | void JSI_Lobby::SetRankedGame(ScriptInterface::CmptPrivate* UNUSED(pCmptPrivate), bool isRanked) | ||||
{ | { | ||||
g_rankedGame = isRanked; | g_rankedGame = isRanked; | ||||
} | } | ||||
#if CONFIG2_LOBBY | #if CONFIG2_LOBBY | ||||
▲ Show 20 Lines • Show All 436 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
What was the warning here? Maybe !! instead?