Selaa lähdekoodia

IDE build failed because of "'LayerProp::layerID' : only static const integral data members can be initialized within a class" it is fixing this

Joachim Meyer 11 vuotta sitten
vanhempi
sitoutus
23cb86ad3a
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 1 1
      IDE/Contents/Include/PolycodeProps.h
  2. 2 1
      IDE/Contents/Source/PolycodeProps.cpp

+ 1 - 1
IDE/Contents/Include/PolycodeProps.h

@@ -243,7 +243,7 @@ class LayerProp : public PropProp {
     
         UIImageButton *removeLayerButton;
     
-        unsigned char layerID = 0;
+		unsigned char layerID;
     
         UIRect *bgRect;
 };

+ 2 - 1
IDE/Contents/Source/PolycodeProps.cpp

@@ -574,7 +574,8 @@ void RemovableStringProp::handleEvent(Event *event) {
 }
 
 LayerProp::LayerProp(SceneEntityInstance *instance, SceneEntityInstanceLayer *layer) : PropProp("", "Layer") {
-    
+	layerID = 0;
+
     bgRect = new UIRect(1.0, 1.0);
     bgRect->color.setColorHexFromString(CoreServices::getInstance()->getConfig()->getStringValue("Polycode", "uiHeaderBgColor"));