Skip to content

Commit

Permalink
Editor: Make destructors of all objects virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Oct 15, 2024
1 parent a75af69 commit 3338575
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/level/items/item_bgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemBGO : public LvlBaseItem
public:
ItemBGO(QGraphicsItem *parent = nullptr);
ItemBGO(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemBGO();
virtual ~ItemBGO();

void setBGOData(LevelBGO inD, obj_bgo *mergedSet = nullptr, long *animator_id = nullptr);

Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/level/items/item_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemBlock : public LvlBaseItem
public:
ItemBlock(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
ItemBlock(QGraphicsItem *parent = nullptr);
~ItemBlock();
virtual ~ItemBlock();

void setMainPixmap(/*const QPixmap &pixmap*/);
void setBlockData(LevelBlock inD, obj_block *mergedSet = nullptr, long *animator = nullptr);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/level/items/item_door.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemDoor : public LvlBaseItem
public:
ItemDoor(QGraphicsItem *parent = nullptr);
ItemDoor(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemDoor();
virtual ~ItemDoor();

void setDoorData(LevelDoor inD, int doorDir, bool init = false);
void setScenePoint(LvlScene *theScene);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/level/items/item_playerpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemPlayerPoint : public LvlBaseItem
public:
explicit ItemPlayerPoint(QGraphicsItem *parent = nullptr);
explicit ItemPlayerPoint(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemPlayerPoint();
virtual ~ItemPlayerPoint();

QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/level/items/item_water.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemPhysEnv : public LvlBaseItem
public:
ItemPhysEnv(QGraphicsItem *parent = nullptr);
ItemPhysEnv(LvlScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemPhysEnv();
virtual ~ItemPhysEnv();

void setSize(QSize sz);
void setRectSize(QRect rect);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_level.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemLevel : public WldBaseItem
public:
ItemLevel(QGraphicsItem *parent = nullptr);
ItemLevel(WldScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemLevel();
virtual ~ItemLevel();

void setLevelData(WorldLevelTile inD, obj_w_level *mergedSet = nullptr,
long *animator_id = nullptr, long *path_id = nullptr,
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_music.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemMusic : public WldBaseItem
public:
ItemMusic(QGraphicsItem *parent = nullptr);
ItemMusic(WldScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemMusic();
virtual ~ItemMusic();

void setMusicData(WorldMusicBox inD);
void transformTo(int musicID, QString musicFile);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_path.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemPath : public WldBaseItem
public:
ItemPath(QGraphicsItem *parent = nullptr);
ItemPath(WldScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemPath();
virtual ~ItemPath();

void setPathData(WorldPathTile inD, obj_w_path *mergedSet = nullptr, long *animator_id = nullptr);

Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ItemPoint : public WldBaseItem
public:
ItemPoint(QGraphicsItem *parent = nullptr);
ItemPoint(WldScene *scenePoint, QGraphicsItem *parent = nullptr);
~ItemPoint();
virtual ~ItemPoint();

QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemScene : public WldBaseItem
public:
ItemScene(QGraphicsItem *parent = nullptr);
ItemScene(WldScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemScene();
virtual ~ItemScene();

void setSceneData(WorldScenery inD, obj_w_scenery *mergedSet = nullptr, long *animator_id = nullptr);

Expand Down
2 changes: 1 addition & 1 deletion Editor/editing/_scenes/world/items/item_tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ItemTile : public WldBaseItem
public:
ItemTile(QGraphicsItem *parent = nullptr);
ItemTile(WldScene *parentScene, QGraphicsItem *parent = nullptr);
~ItemTile();
virtual ~ItemTile();

void setTileData(WorldTerrainTile inD, obj_w_tile *mergedSet = nullptr, long *animator_id = nullptr);

Expand Down
1 change: 1 addition & 0 deletions changelog.editor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ beta2
- World maps saving into the SMBX-38A format now works
- Reworked the message box edit dialogue: Added the accurate preview for different target engines
- Added layer and event statistics that can be opened by layer's or event's context menu
- Fixed random crashes when removing objects from the scene

Editor 0.3.2
- Added support for an element (Block, BGO, NPC), section, and level-wide Extra Settings
Expand Down

0 comments on commit 3338575

Please sign in to comment.