mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
lib/NetPacksLib.cpp: Directly assign to the "std::optional", without dereferencing it.
Assigning to an optional should directly target the optional
This commit is contained in:
@@ -2100,7 +2100,7 @@ void SetObjectProperty::applyGs(CGameState * gs) const
|
|||||||
state->towns -= t;
|
state->towns -= t;
|
||||||
|
|
||||||
if(state->towns.empty())
|
if(state->towns.empty())
|
||||||
*state->daysWithoutCastle = 0;
|
state->daysWithoutCastle = 0;
|
||||||
}
|
}
|
||||||
if(PlayerColor(val).isValidPlayer())
|
if(PlayerColor(val).isValidPlayer())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user