Răsfoiți Sursa

lib/NetPacksLib.cpp: Directly assign to the "std::optional", without dereferencing it.

Assigning to an optional should directly target the optional
Alexander Wilms 2 ani în urmă
părinte
comite
3d8dd35d43
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      lib/NetPacksLib.cpp

+ 1 - 1
lib/NetPacksLib.cpp

@@ -2100,7 +2100,7 @@ void SetObjectProperty::applyGs(CGameState * gs) const
 				state->towns -= t;
 
 				if(state->towns.empty())
-					*state->daysWithoutCastle = 0;
+					state->daysWithoutCastle = 0;
 			}
 			if(PlayerColor(val).isValidPlayer())
 			{