mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 03:57:51 +03:00
Use make_unique
This commit is contained in:
parent
f4bc06604a
commit
3c8943c876
2 changed files with 2 additions and 3 deletions
|
@ -125,8 +125,7 @@ namespace MWClass
|
||||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||||
ptr.get<ESM::Potion>();
|
ptr.get<ESM::Potion>();
|
||||||
|
|
||||||
std::unique_ptr<MWWorld::Action> action (
|
auto action = std::make_unique<MWWorld::ActionApply>(ptr, ref->mBase->mId);
|
||||||
new MWWorld::ActionApply (ptr, ref->mBase->mId));
|
|
||||||
|
|
||||||
action->setSound ("Drink");
|
action->setSound ("Drink");
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace MWGui
|
||||||
, mCurrentFilter(FilterType::ByName)
|
, mCurrentFilter(FilterType::ByName)
|
||||||
, mModel(nullptr)
|
, mModel(nullptr)
|
||||||
, mSortModel(nullptr)
|
, mSortModel(nullptr)
|
||||||
, mAlchemy(new MWMechanics::Alchemy())
|
, mAlchemy(std::make_unique<MWMechanics::Alchemy>())
|
||||||
, mApparatus (4)
|
, mApparatus (4)
|
||||||
, mIngredients (4)
|
, mIngredients (4)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue