Просмотр исходного кода

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

Assigning to an optional should directly target the optional
Alexander Wilms 2 лет назад
Родитель
Сommit
3d8dd35d43
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/NetPacksLib.cpp

+ 1 - 1
lib/NetPacksLib.cpp

@@ -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())
 			{
 			{