소스 검색

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());
 	}
 }