mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 08:06:43 +00: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 =
|
||||
ptr.get<ESM::Potion>();
|
||||
|
||||
std::unique_ptr<MWWorld::Action> action (
|
||||
new MWWorld::ActionApply (ptr, ref->mBase->mId));
|
||||
auto action = std::make_unique<MWWorld::ActionApply>(ptr, ref->mBase->mId);
|
||||
|
||||
action->setSound ("Drink");
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace MWGui
|
|||
, mCurrentFilter(FilterType::ByName)
|
||||
, mModel(nullptr)
|
||||
, mSortModel(nullptr)
|
||||
, mAlchemy(new MWMechanics::Alchemy())
|
||||
, mAlchemy(std::make_unique<MWMechanics::Alchemy>())
|
||||
, mApparatus (4)
|
||||
, mIngredients (4)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue