mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-27 14:37:04 +00:00
Merge branch 'references' into 'master'
Pass some arguments by references See merge request OpenMW/openmw!3824
This commit is contained in:
commit
720573115d
@ -10,10 +10,10 @@
|
|||||||
namespace MWPhysics
|
namespace MWPhysics
|
||||||
{
|
{
|
||||||
ClosestNotMeRayResultCallback::ClosestNotMeRayResultCallback(const btCollisionObject* me,
|
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)
|
: btCollisionWorld::ClosestRayResultCallback(from, to)
|
||||||
, mMe(me)
|
, mMe(me)
|
||||||
, mTargets(std::move(targets))
|
, mTargets(targets)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace MWPhysics
|
|||||||
class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
|
class ClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
|
||||||
{
|
{
|
||||||
public:
|
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);
|
const btVector3& from, const btVector3& to);
|
||||||
|
|
||||||
btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) override;
|
btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult, bool normalInWorldSpace) override;
|
||||||
|
@ -84,8 +84,8 @@ void MWState::Character::addSlot(const ESM::SavedGame& profile)
|
|||||||
mSlots.push_back(slot);
|
mSlots.push_back(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
MWState::Character::Character(std::filesystem::path saves, const std::string& game)
|
MWState::Character::Character(const std::filesystem::path& saves, const std::string& game)
|
||||||
: mPath(std::move(saves))
|
: mPath(saves)
|
||||||
{
|
{
|
||||||
if (!std::filesystem::is_directory(mPath))
|
if (!std::filesystem::is_directory(mPath))
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ namespace MWState
|
|||||||
void addSlot(const ESM::SavedGame& profile);
|
void addSlot(const ESM::SavedGame& profile);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Character(std::filesystem::path saves, const std::string& game);
|
Character(const std::filesystem::path& saves, const std::string& game);
|
||||||
|
|
||||||
void cleanup();
|
void cleanup();
|
||||||
///< Delete the directory we used, if it is empty
|
///< 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,
|
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 = new osg::PositionAttitudeTransform;
|
||||||
state.mNode->setNodeMask(MWRender::Mask_Effect);
|
state.mNode->setNodeMask(MWRender::Mask_Effect);
|
||||||
|
@ -136,7 +136,7 @@ namespace MWWorld
|
|||||||
void moveMagicBolts(float dt);
|
void moveMagicBolts(float dt);
|
||||||
|
|
||||||
void createModel(State& state, const std::string& model, const osg::Vec3f& pos, const osg::Quat& orient,
|
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 update(State& state, float duration);
|
||||||
|
|
||||||
void operator=(const ProjectileManager&);
|
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)
|
for (ButtonGroup::iterator it = group.begin(); it != group.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ namespace Gui
|
|||||||
void shareStateWith(const ButtonGroup& shared);
|
void shareStateWith(const ButtonGroup& shared);
|
||||||
|
|
||||||
/// @note The ButtonGroup connection will be destroyed when any widget in the group gets destroyed.
|
/// @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
|
//! Set button selected state
|
||||||
void setStateSelected(bool _value);
|
void setStateSelected(bool _value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user