mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
pass by const ref and other fixes
This commit is contained in:
parent
20ab7df19f
commit
46ee639892
3 changed files with 12 additions and 7 deletions
|
@ -56,9 +56,11 @@ void CSVRender::TerrainSelection::onlySelect(const std::vector<std::pair<int, in
|
|||
void CSVRender::TerrainSelection::addSelect(const std::pair<int, int> localPos)
|
||||
{
|
||||
if (std::find(mSelection.begin(), mSelection.end(), localPos) == mSelection.end())
|
||||
{
|
||||
mSelection.emplace_back(localPos);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void CSVRender::TerrainSelection::toggleSelect(const std::vector<std::pair<int, int>> localPositions, bool toggleInProgress)
|
||||
{
|
||||
|
@ -115,7 +117,7 @@ void CSVRender::TerrainSelection::activate()
|
|||
|
||||
void CSVRender::TerrainSelection::deactivate()
|
||||
{
|
||||
if (mParentNode->containsNode(mSelectionNode)) mParentNode->removeChild(mSelectionNode);
|
||||
mParentNode->removeChild(mSelectionNode);
|
||||
}
|
||||
|
||||
void CSVRender::TerrainSelection::update()
|
||||
|
|
|
@ -493,7 +493,7 @@ void CSVRender::TerrainTextureMode::editTerrainTextureGrid(const WorldspaceHitRe
|
|||
}
|
||||
}
|
||||
|
||||
void CSVRender::TerrainTextureMode::selectTerrainTextures(std::pair<int, int> texCoords, unsigned char selectMode, bool dragOperation)
|
||||
void CSVRender::TerrainTextureMode::selectTerrainTextures(const std::pair<int, int>& texCoords, unsigned char selectMode, bool dragOperation)
|
||||
{
|
||||
int r = mBrushSize / 2;
|
||||
std::vector<std::pair<int, int>> selections;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include <osg/Group>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QEvent>
|
||||
|
||||
|
@ -23,6 +21,11 @@
|
|||
|
||||
#include "terrainselection.hpp"
|
||||
|
||||
namespace osg
|
||||
{
|
||||
class Group;
|
||||
}
|
||||
|
||||
namespace CSVWidget
|
||||
{
|
||||
class SceneToolTextureBrush;
|
||||
|
@ -82,7 +85,7 @@ namespace CSVRender
|
|||
void editTerrainTextureGrid (const WorldspaceHitResult& hit);
|
||||
|
||||
/// \brief Handle brush mechanics for texture selection
|
||||
void selectTerrainTextures (std::pair<int, int>, unsigned char, bool);
|
||||
void selectTerrainTextures (const std::pair<int, int>& texCoords, unsigned char selectMode, bool dragOperation);
|
||||
|
||||
/// \brief Push texture edits to command macro
|
||||
void pushEditToCommand (CSMWorld::LandTexturesColumn::DataType& newLandGrid, CSMDoc::Document& document,
|
||||
|
|
Loading…
Reference in a new issue