浏览代码

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

Assigning to an optional should directly target the optional
Alexander Wilms 2 年之前
父节点
当前提交
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;
 
 				if(state->towns.empty())
-					*state->daysWithoutCastle = 0;
+					state->daysWithoutCastle = 0;
 			}
 			if(PlayerColor(val).isValidPlayer())
 			{