mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 17:15:34 +00:00
Pass some arguments by references
This commit is contained in:
parent
2114f84939
commit
66d1e036d2
8 changed files with 10 additions and 10 deletions
|
@ -10,10 +10,10 @@
|
|||
namespace MWPhysics
|
||||
{
|
||||
ClosestNotMeRayResultCallback::ClosestNotMeRayResultCallback(const btCollisionObject* me,
|
||||
std::vector<const btCollisionObject*> targets, const btVector3& from, const btVector3& to)
|
||||
const std::vector<const btCollisionObject*>& targets, const btVector3& from, const btVector3& to)
|
||||
: btCollisionWorld::ClosestRayResultCallback(from, to)
|
||||
, mMe(me)
|
||||
, mTargets(std::move(targets))
|
||||
, mTargets(targets)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWPhysics
|
|||
class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
|
||||
{
|
||||
public:
|
||||
ClosestNotMeRayResultCallback(const btCollisionObject* me, std::vector<const btCollisionObject*> targets,
|
||||
ClosestNotMeRayResultCallback(const btCollisionObject* me, const std::vector<const btCollisionObject*>& targets,
|
||||
const btVector3& from, const btVector3& to);
|
||||
|
||||
btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) override;
|
||||
|
|
|
@ -84,8 +84,8 @@ void MWState::Character::addSlot(const ESM::SavedGame& profile)
|
|||
mSlots.push_back(slot);
|
||||
}
|
||||
|
||||
MWState::Character::Character(std::filesystem::path saves, const std::string& game)
|
||||
: mPath(std::move(saves))
|
||||
MWState::Character::Character(const std::filesystem::path& saves, const std::string& game)
|
||||
: mPath(saves)
|
||||
{
|
||||
if (!std::filesystem::is_directory(mPath))
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace MWState
|
|||
void addSlot(const ESM::SavedGame& profile);
|
||||
|
||||
public:
|
||||
Character(std::filesystem::path saves, const std::string& game);
|
||||
Character(const std::filesystem::path& saves, const std::string& game);
|
||||
|
||||
void cleanup();
|
||||
///< Delete the directory we used, if it is empty
|
||||
|
|
|
@ -188,7 +188,7 @@ namespace MWWorld
|
|||
};
|
||||
|
||||
void ProjectileManager::createModel(State& state, const std::string& model, const osg::Vec3f& pos,
|
||||
const osg::Quat& orient, bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, std::string texture)
|
||||
const osg::Quat& orient, bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, const std::string& texture)
|
||||
{
|
||||
state.mNode = new osg::PositionAttitudeTransform;
|
||||
state.mNode->setNodeMask(MWRender::Mask_Effect);
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace MWWorld
|
|||
void moveMagicBolts(float dt);
|
||||
|
||||
void createModel(State& state, const std::string& model, const osg::Vec3f& pos, const osg::Quat& orient,
|
||||
bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, std::string texture = "");
|
||||
bool rotate, bool createLight, osg::Vec4 lightDiffuseColor, const std::string& texture = "");
|
||||
void update(State& state, float duration);
|
||||
|
||||
void operator=(const ProjectileManager&);
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace Gui
|
|||
}
|
||||
}
|
||||
|
||||
void SharedStateButton::createButtonGroup(ButtonGroup group)
|
||||
void SharedStateButton::createButtonGroup(ButtonGroup& group)
|
||||
{
|
||||
for (ButtonGroup::iterator it = group.begin(); it != group.end(); ++it)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace Gui
|
|||
void shareStateWith(const ButtonGroup& shared);
|
||||
|
||||
/// @note The ButtonGroup connection will be destroyed when any widget in the group gets destroyed.
|
||||
static void createButtonGroup(ButtonGroup group);
|
||||
static void createButtonGroup(ButtonGroup& group);
|
||||
|
||||
//! Set button selected state
|
||||
void setStateSelected(bool _value);
|
||||
|
|
Loading…
Reference in a new issue