Browse Source

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 years ago
parent
commit
a6db82f6f1
1 changed files with 1 additions and 1 deletions
  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());
 	}
 }