瀏覽代碼

mapeditor/inspector/inspector.cpp: Directly assign to the "std::optional", without dereferencing it.

Assigning to an optional should directly target the optiona
Alexander Wilms 2 年之前
父節點
當前提交
a6db82f6f1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mapeditor/inspector/inspector.cpp

+ 1 - 1
mapeditor/inspector/inspector.cpp

@@ -685,7 +685,7 @@ void Inspector::setProperty(CGHeroPlaceholder * o, const QString & key, const QV
 	
 	if(key == "Hero type")
 	{
-		o->heroType.value() = HeroTypeID(value.toInt());
+		o->heroType = HeroTypeID(value.toInt());
 	}
 }