override, virtual -> final, remove unused variables, public to private.

pull/2520/head
Nelsson Huotari 5 years ago
parent 6a3070e680
commit c2de645c8c

@ -47,7 +47,7 @@ CSVRender::TerrainShapeMode::TerrainShapeMode (WorldspaceWidget *worldspaceWidge
: EditMode (worldspaceWidget, QIcon {":scenetoolbar/editing-terrain-shape"}, Mask_Terrain | Mask_Reference, "Terrain land editing", parent),
mBrushSize(1),
mBrushShape(CSVWidget::BrushShape_Point),
mShapeBrushScenetool(0),
mShapeBrushScenetool(nullptr),
mDragMode(InteractionType_None),
mParentNode(parentNode),
mIsEditing(false),

@ -72,24 +72,25 @@ namespace CSVRender
void deactivate(CSVWidget::SceneToolbar*);
/// Start shape editing command macro
virtual bool primaryEditStartDrag (const QPoint& pos);
bool primaryEditStartDrag (const QPoint& pos) final;
virtual bool secondaryEditStartDrag (const QPoint& pos);
virtual bool primarySelectStartDrag (const QPoint& pos);
virtual bool secondarySelectStartDrag (const QPoint& pos);
bool secondaryEditStartDrag (const QPoint& pos) final;
bool primarySelectStartDrag (const QPoint& pos) final;
bool secondarySelectStartDrag (const QPoint& pos) final;
/// Handle shape edit behavior during dragging
virtual void drag (const QPoint& pos, int diffX, int diffY, double speedFactor);
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) final;
/// End shape editing command macro
virtual void dragCompleted(const QPoint& pos);
void dragCompleted(const QPoint& pos) final;
/// Cancel shape editing, and reset all pending changes
virtual void dragAborted();
void dragAborted() final;
virtual void dragWheel (int diff, double speedFactor);
virtual void dragMoveEvent (QDragMoveEvent *event);
void dragWheel (int diff, double speedFactor) final;
void dragMoveEvent (QDragMoveEvent *event) final;
private:
/// Move pending alteredHeights changes to omwgame/omeaddon -data
void applyTerrainEditChanges();
@ -138,7 +139,6 @@ namespace CSVRender
/// Create new cell and land if needed
bool allowLandShapeEditing(const std::string& textureFileName);
private:
std::string mCellId;
std::string mBrushTexture;
int mBrushSize;

@ -13,8 +13,6 @@
namespace CSVRender
{
const float defaultHeight = ESM::Land::DEFAULT_HEIGHT;
TerrainStorage::TerrainStorage(const CSMWorld::Data &data)
: ESMTerrain::Storage(data.getResourceSystem()->getVFS())
, mData(data)

@ -16,7 +16,6 @@ namespace CSVRender
{
public:
TerrainStorage(const CSMWorld::Data& data);
std::array<float, ESM::Land::LAND_SIZE * ESM::Land::LAND_SIZE> mAlteredHeight;
void setAlteredHeight(int inCellX, int inCellY, float heightMap);
void resetHeights();
float getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY);
@ -24,11 +23,12 @@ namespace CSVRender
private:
const CSMWorld::Data& mData;
std::array<float, ESM::Land::LAND_SIZE * ESM::Land::LAND_SIZE> mAlteredHeight;
virtual osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) override;
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) override;
osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) final;
const ESM::LandTexture* getLandTexture(int index, short plugin) final;
virtual void getBounds(float& minX, float& maxX, float& minY, float& maxY) override;
void getBounds(float& minX, float& maxX, float& minY, float& maxY) final;
int getThisHeight(int col, int row, const ESM::Land::LandData *heightData) const;
int getLeftHeight(int col, int row, const ESM::Land::LandData *heightData) const;
@ -42,8 +42,8 @@ namespace CSVRender
bool leftOrUpIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
bool rightOrDownIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const override;
float getAlteredHeight(int col, int row) const override;
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const final;
float getAlteredHeight(int col, int row) const final;
};
}

Loading…
Cancel
Save