From 3c76764ef43c2269cb79d57dc8bfa35b7cff5789 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 7 Jul 2015 22:11:07 +0200 Subject: [PATCH] replaced auto_ptr with unique_ptr --- apps/opencs/editor.hpp | 2 +- apps/opencs/model/world/commanddispatcher.cpp | 4 +-- apps/opencs/model/world/refidcollection.cpp | 2 +- apps/opencs/view/render/cell.hpp | 2 +- .../view/render/unpagedworldspacewidget.hpp | 2 +- apps/opencs/view/world/creator.hpp | 2 +- apps/opencs/view/world/dialoguesubview.cpp | 30 +++++++++---------- apps/opencs/view/world/dialoguesubview.hpp | 2 +- apps/opencs/view/world/genericcreator.cpp | 6 ++-- apps/opencs/view/world/genericcreator.hpp | 2 +- apps/opencs/view/world/referencecreator.cpp | 12 ++++---- apps/opencs/view/world/referencecreator.hpp | 2 +- apps/openmw/engine.hpp | 4 +-- apps/openmw/main.cpp | 2 +- apps/openmw/mwclass/container.cpp | 4 +-- apps/openmw/mwclass/creature.cpp | 4 +-- apps/openmw/mwclass/creaturelevlist.cpp | 2 +- apps/openmw/mwclass/door.cpp | 2 +- apps/openmw/mwclass/npc.cpp | 4 +-- apps/openmw/mwgui/alchemywindow.cpp | 2 ++ apps/openmw/mwgui/alchemywindow.hpp | 3 +- apps/openmw/mwgui/inventorywindow.cpp | 2 ++ apps/openmw/mwgui/inventorywindow.hpp | 6 ++-- apps/openmw/mwgui/loadingscreen.hpp | 2 +- apps/openmw/mwgui/mapwindow.hpp | 4 +-- apps/openmw/mwgui/race.cpp | 2 ++ apps/openmw/mwgui/race.hpp | 6 ++-- apps/openmw/mwgui/savegamedialog.hpp | 2 +- apps/openmw/mwgui/spellview.hpp | 2 +- apps/openmw/mwgui/videowidget.hpp | 4 +-- apps/openmw/mwgui/windowmanagerimp.hpp | 2 +- apps/openmw/mwmechanics/actor.hpp | 2 +- apps/openmw/mwmechanics/aiactivate.cpp | 2 +- apps/openmw/mwmechanics/aicombat.cpp | 2 +- apps/openmw/mwmechanics/aiescort.cpp | 2 +- apps/openmw/mwmechanics/aifollow.cpp | 2 +- apps/openmw/mwmechanics/aipursue.cpp | 2 +- apps/openmw/mwmechanics/aitravel.cpp | 2 +- apps/openmw/mwmechanics/aiwander.cpp | 2 +- apps/openmw/mwphysics/actor.cpp | 2 +- apps/openmw/mwphysics/actor.hpp | 4 +-- apps/openmw/mwphysics/physicssystem.cpp | 2 +- apps/openmw/mwphysics/physicssystem.hpp | 8 ++--- apps/openmw/mwrender/localmap.cpp | 4 +-- apps/openmw/mwrender/objects.cpp | 6 ++-- apps/openmw/mwrender/renderingmanager.hpp | 16 +++++----- apps/openmw/mwrender/sky.hpp | 6 ++-- apps/openmw/mwrender/water.hpp | 2 +- apps/openmw/mwsound/ffmpeg_decoder.cpp | 2 +- apps/openmw/mwsound/openal_output.hpp | 2 +- apps/openmw/mwsound/soundmanagerimp.hpp | 2 +- components/compiler/lineparser.cpp | 2 +- components/esm/aisequence.cpp | 14 ++++----- components/myguiplatform/myguidatamanager.cpp | 2 +- components/nifbullet/bulletnifloader.cpp | 2 +- components/resource/resourcesystem.hpp | 4 +-- components/sceneutil/skeleton.hpp | 2 +- components/terrain/terraingrid.cpp | 2 +- .../osg-ffmpeg-videoplayer/audiodecoder.hpp | 2 +- extern/osg-ffmpeg-videoplayer/videoplayer.hpp | 2 +- 60 files changed, 121 insertions(+), 110 deletions(-) diff --git a/apps/opencs/editor.hpp b/apps/opencs/editor.hpp index 0464fb7eb..5d695f3f5 100644 --- a/apps/opencs/editor.hpp +++ b/apps/opencs/editor.hpp @@ -39,7 +39,7 @@ namespace CS Q_OBJECT // FIXME: should be moved to document, so we can have different resources for each opened project - std::auto_ptr mVFS; + std::unique_ptr mVFS; Files::ConfigurationManager mCfgMgr; CSMSettings::UserSettings mUserSettings; diff --git a/apps/opencs/model/world/commanddispatcher.cpp b/apps/opencs/model/world/commanddispatcher.cpp index b9d5bd7fe..e6ed406db 100644 --- a/apps/opencs/model/world/commanddispatcher.cpp +++ b/apps/opencs/model/world/commanddispatcher.cpp @@ -138,7 +138,7 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons if (mLocked) return; - std::auto_ptr modifyCell; + std::unique_ptr modifyCell; int columnId = model->data (index, ColumnBase::Role_ColumnId).toInt(); @@ -167,7 +167,7 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons } } - std::auto_ptr modifyData ( + std::unique_ptr modifyData ( new CSMWorld::ModifyCommand (*model, index, new_)); if (modifyCell.get()) diff --git a/apps/opencs/model/world/refidcollection.cpp b/apps/opencs/model/world/refidcollection.cpp index 5495926b4..dadc1b3db 100644 --- a/apps/opencs/model/world/refidcollection.cpp +++ b/apps/opencs/model/world/refidcollection.cpp @@ -738,7 +738,7 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin, const std::string& destination, const CSMWorld::UniversalId::Type type) { - std::auto_ptr newRecord(mData.getRecord(mData.searchId(origin)).modifiedCopy()); + std::unique_ptr newRecord(mData.getRecord(mData.searchId(origin)).modifiedCopy()); mAdapters.find(type)->second->setId(*newRecord, destination); mData.insertRecord(*newRecord, type, destination); } diff --git a/apps/opencs/view/render/cell.hpp b/apps/opencs/view/render/cell.hpp index ebc369bec..5657eab7b 100644 --- a/apps/opencs/view/render/cell.hpp +++ b/apps/opencs/view/render/cell.hpp @@ -35,7 +35,7 @@ namespace CSVRender std::string mId; osg::ref_ptr mCellNode; std::map mObjects; - std::auto_ptr mTerrain; + std::unique_ptr mTerrain; int mX; int mY; diff --git a/apps/opencs/view/render/unpagedworldspacewidget.hpp b/apps/opencs/view/render/unpagedworldspacewidget.hpp index d01c3e766..1dd2c94ce 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.hpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.hpp @@ -28,7 +28,7 @@ namespace CSVRender std::string mCellId; CSMWorld::IdTable *mCellsModel; CSMWorld::IdTable *mReferenceablesModel; - std::auto_ptr mCell; + std::unique_ptr mCell; void update(); diff --git a/apps/opencs/view/world/creator.hpp b/apps/opencs/view/world/creator.hpp index b76348199..320bbf6ae 100644 --- a/apps/opencs/view/world/creator.hpp +++ b/apps/opencs/view/world/creator.hpp @@ -91,7 +91,7 @@ namespace CSVWorld Creator *CreatorFactory::makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const { - std::auto_ptr creator (new CreatorT (document.getData(), document.getUndoStack(), id)); + std::unique_ptr creator (new CreatorT (document.getData(), document.getUndoStack(), id)); creator->setScope (scope); diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index ed50b81cd..016bb22c3 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -66,7 +66,7 @@ void CSVWorld::NotEditableSubDelegate::setEditorData (QWidget* editor, const QMo CSMWorld::Columns::ColumnId columnId = static_cast ( mTable->getColumnId (index.column())); - + if (QVariant::String == v.type()) { label->setText(v.toString()); @@ -75,7 +75,7 @@ void CSVWorld::NotEditableSubDelegate::setEditorData (QWidget* editor, const QMo { int data = v.toInt(); std::vector enumNames (CSMWorld::Columns::getEnums (columnId)); - + label->setText(QString::fromUtf8(enumNames.at(data).c_str())); } else @@ -116,7 +116,7 @@ mIndex(index) CSVWorld::DialogueDelegateDispatcherProxy::DialogueDelegateDispatcherProxy(QWidget* editor, CSMWorld::ColumnBase::Display display) : mEditor(editor), mDisplay(display), -mIndexWrapper(NULL) +mIndexWrapper(nullptr) { } @@ -324,11 +324,11 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di Q_ASSERT(mWidget != NULL); Q_ASSERT(CSMWorld::ColumnBase::isId(display)); Q_ASSERT(mIdType != CSMWorld::UniversalId::Type_None); - + mWidget->setContextMenuPolicy(Qt::CustomContextMenu); - connect(mWidget, - SIGNAL(customContextMenuRequested(const QPoint &)), - this, + connect(mWidget, + SIGNAL(customContextMenuRequested(const QPoint &)), + this, SLOT(showContextMenu(const QPoint &))); mEditIdAction = new QAction(this); @@ -352,7 +352,7 @@ void CSVWorld::IdContextMenu::excludeId(const std::string &id) QString CSVWorld::IdContextMenu::getWidgetValue() const { - QLineEdit *lineEdit = qobject_cast(mWidget); + QLineEdit *lineEdit = qobject_cast(mWidget); QLabel *label = qobject_cast(mWidget); QString value = ""; @@ -411,7 +411,7 @@ void CSVWorld::IdContextMenu::showContextMenu(const QPoint &pos) { removeEditIdActionFromMenu(); } - + if (!mContextMenu->actions().isEmpty()) { mContextMenu->exec(mWidget->mapToGlobal(pos)); @@ -588,9 +588,9 @@ void CSVWorld::EditWidget::remake(int row) tablesLayout->addWidget(label); tablesLayout->addWidget(table); - connect(table, - SIGNAL(editRequest(const CSMWorld::UniversalId &, const std::string &)), - this, + connect(table, + SIGNAL(editRequest(const CSMWorld::UniversalId &, const std::string &)), + this, SIGNAL(editIdRequest(const CSMWorld::UniversalId &, const std::string &))); } else if (!(flags & CSMWorld::ColumnBase::Flag_Dialogue_List)) @@ -854,7 +854,7 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, connect (mButtons, SIGNAL (showPreview()), this, SLOT (showPreview())); connect (mButtons, SIGNAL (viewRecord()), this, SLOT (viewRecord())); connect (mButtons, SIGNAL (switchToRow (int)), this, SLOT (switchToRow (int))); - + connect (this, SIGNAL (universalIdChanged (const CSMWorld::UniversalId&)), mButtons, SLOT (universalIdChanged (const CSMWorld::UniversalId&))); } @@ -908,7 +908,7 @@ void CSVWorld::DialogueSubView::switchToRow (int row) setUniversalId (CSMWorld::UniversalId (type, id)); updateCurrentId(); - + getEditWidget().remake (row); int stateColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Modification); @@ -923,5 +923,5 @@ void CSVWorld::DialogueSubView::requestFocus (const std::string& id) QModelIndex index = getTable().getModelIndex (id, 0); if (index.isValid()) - switchToRow (index.row()); + switchToRow (index.row()); } diff --git a/apps/opencs/view/world/dialoguesubview.hpp b/apps/opencs/view/world/dialoguesubview.hpp index d82936e45..e51db4940 100644 --- a/apps/opencs/view/world/dialoguesubview.hpp +++ b/apps/opencs/view/world/dialoguesubview.hpp @@ -79,7 +79,7 @@ namespace CSVWorld CSMWorld::ColumnBase::Display mDisplay; - std::auto_ptr mIndexWrapper; + std::unique_ptr mIndexWrapper; public: DialogueDelegateDispatcherProxy(QWidget* editor, diff --git a/apps/opencs/view/world/genericcreator.cpp b/apps/opencs/view/world/genericcreator.cpp index 5f04d9a7a..b0da2f481 100644 --- a/apps/opencs/view/world/genericcreator.cpp +++ b/apps/opencs/view/world/genericcreator.cpp @@ -50,7 +50,7 @@ std::string CSVWorld::GenericCreator::getId() const void CSVWorld::GenericCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const {} -void CSVWorld::GenericCreator::pushCommand (std::auto_ptr command, +void CSVWorld::GenericCreator::pushCommand (std::unique_ptr command, const std::string& id) { mUndoStack.push (command.release()); @@ -202,7 +202,7 @@ void CSVWorld::GenericCreator::create() { std::string id = getId(); - std::auto_ptr command; + std::unique_ptr command; if (mCloneMode) { @@ -217,7 +217,7 @@ void CSVWorld::GenericCreator::create() } configureCreateCommand (*command); - pushCommand (command, id); + pushCommand (std::move (command), id); emit done(); emit requestFocus(id); diff --git a/apps/opencs/view/world/genericcreator.hpp b/apps/opencs/view/world/genericcreator.hpp index 471d0622e..e820a3aa6 100644 --- a/apps/opencs/view/world/genericcreator.hpp +++ b/apps/opencs/view/world/genericcreator.hpp @@ -65,7 +65,7 @@ namespace CSVWorld /// Allow subclasses to wrap the create command together with additional commands /// into a macro. - virtual void pushCommand (std::auto_ptr command, + virtual void pushCommand (std::unique_ptr command, const std::string& id); CSMWorld::Data& getData() const; diff --git a/apps/opencs/view/world/referencecreator.cpp b/apps/opencs/view/world/referencecreator.cpp index 2b0d44df0..3af56e615 100644 --- a/apps/opencs/view/world/referencecreator.cpp +++ b/apps/opencs/view/world/referencecreator.cpp @@ -35,7 +35,7 @@ void CSVWorld::ReferenceCreator::configureCreateCommand (CSMWorld::CreateCommand command.addValue (refNumColumn, getRefNumCount()); } -void CSVWorld::ReferenceCreator::pushCommand (std::auto_ptr command, +void CSVWorld::ReferenceCreator::pushCommand (std::unique_ptr command, const std::string& id) { // get the old count @@ -51,11 +51,11 @@ void CSVWorld::ReferenceCreator::pushCommand (std::auto_ptr increment (new CSMWorld::ModifyCommand + std::unique_ptr increment (new CSMWorld::ModifyCommand (cellTable, countIndex, count+1)); getUndoStack().beginMacro (command->text()); - GenericCreator::pushCommand (command, id); + GenericCreator::pushCommand (std::move (command), id); getUndoStack().push (increment.release()); getUndoStack().endMacro(); } @@ -148,11 +148,11 @@ void CSVWorld::ReferenceCreator::cloneMode(const std::string& originId, cellChanged(); //otherwise ok button will remain disabled } -CSVWorld::Creator *CSVWorld::ReferenceCreatorFactory::makeCreator (CSMDoc::Document& document, +CSVWorld::Creator *CSVWorld::ReferenceCreatorFactory::makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const { - return new ReferenceCreator(document.getData(), - document.getUndoStack(), + return new ReferenceCreator(document.getData(), + document.getUndoStack(), id, document.getIdCompletionManager()); } diff --git a/apps/opencs/view/world/referencecreator.hpp b/apps/opencs/view/world/referencecreator.hpp index c230d0126..8b250861f 100644 --- a/apps/opencs/view/world/referencecreator.hpp +++ b/apps/opencs/view/world/referencecreator.hpp @@ -29,7 +29,7 @@ namespace CSVWorld virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const; - virtual void pushCommand (std::auto_ptr command, + virtual void pushCommand (std::unique_ptr command, const std::string& id); int getRefNumCount() const; diff --git a/apps/openmw/engine.hpp b/apps/openmw/engine.hpp index 73de57dc4..2f29f48c9 100644 --- a/apps/openmw/engine.hpp +++ b/apps/openmw/engine.hpp @@ -66,8 +66,8 @@ namespace OMW class Engine { SDL_Window* mWindow; - std::auto_ptr mVFS; - std::auto_ptr mResourceSystem; + std::unique_ptr mVFS; + std::unique_ptr mResourceSystem; MWBase::Environment mEnvironment; ToUTF8::FromType mEncoding; ToUTF8::Utf8Encoder* mEncoder; diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index dc58daed9..69937d6df 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -338,7 +338,7 @@ int main(int argc, char**argv) boost::filesystem::ofstream logfile; - std::auto_ptr engine; + std::unique_ptr engine; int ret = 0; try diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index 5e5af511f..15aa15f01 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -54,7 +54,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data (new ContainerCustomData); + std::unique_ptr data (new ContainerCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -299,7 +299,7 @@ namespace MWClass if (!ptr.getRefData().getCustomData()) { // Create a CustomData, but don't fill it from ESM records (not needed) - std::auto_ptr data (new ContainerCustomData); + std::unique_ptr data (new ContainerCustomData); ptr.getRefData().setCustomData (data.release()); } diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 16051dcd1..0e628d052 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -92,7 +92,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data (new CreatureCustomData); + std::unique_ptr data (new CreatureCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -803,7 +803,7 @@ namespace MWClass if (!ptr.getRefData().getCustomData()) { // Create a CustomData, but don't fill it from ESM records (not needed) - std::auto_ptr data (new CreatureCustomData); + std::unique_ptr data (new CreatureCustomData); MWWorld::LiveCellRef *ref = ptr.get(); diff --git a/apps/openmw/mwclass/creaturelevlist.cpp b/apps/openmw/mwclass/creaturelevlist.cpp index aca820fd1..479cd3a62 100644 --- a/apps/openmw/mwclass/creaturelevlist.cpp +++ b/apps/openmw/mwclass/creaturelevlist.cpp @@ -91,7 +91,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data (new CreatureLevListCustomData); + std::unique_ptr data (new CreatureLevListCustomData); data->mSpawnActorId = -1; data->mSpawn = true; diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index a06c681c5..972d60ee1 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -307,7 +307,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data(new DoorCustomData); + std::unique_ptr data(new DoorCustomData); data->mDoorState = 0; ptr.getRefData().setCustomData(data.release()); diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index e2ef47808..0850e3ff1 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -290,7 +290,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data(new NpcCustomData); + std::unique_ptr data(new NpcCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -1238,7 +1238,7 @@ namespace MWClass if (!ptr.getRefData().getCustomData()) { // Create a CustomData, but don't fill it from ESM records (not needed) - std::auto_ptr data (new NpcCustomData); + std::unique_ptr data (new NpcCustomData); ptr.getRefData().setCustomData (data.release()); } } diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index 768ad82e4..cb5c0b423 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -59,6 +59,8 @@ namespace MWGui center(); } + AlchemyWindow::~AlchemyWindow() {} + void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender) { exit(); diff --git a/apps/openmw/mwgui/alchemywindow.hpp b/apps/openmw/mwgui/alchemywindow.hpp index 69fff8c67..3d368935a 100644 --- a/apps/openmw/mwgui/alchemywindow.hpp +++ b/apps/openmw/mwgui/alchemywindow.hpp @@ -21,6 +21,7 @@ namespace MWGui { public: AlchemyWindow(); + ~AlchemyWindow(); virtual void open(); virtual void exit(); @@ -48,7 +49,7 @@ namespace MWGui void update(); - std::auto_ptr mAlchemy; + std::unique_ptr mAlchemy; std::vector mApparatus; std::vector mIngredients; diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index fa57ee1a6..7d52db0fd 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -102,6 +102,8 @@ namespace MWGui adjustPanes(); } + InventoryWindow::~InventoryWindow() {} + void InventoryWindow::adjustPanes() { const float aspect = 0.5; // fixed aspect ratio for the avatar image diff --git a/apps/openmw/mwgui/inventorywindow.hpp b/apps/openmw/mwgui/inventorywindow.hpp index a8a1b15a1..d97845d56 100644 --- a/apps/openmw/mwgui/inventorywindow.hpp +++ b/apps/openmw/mwgui/inventorywindow.hpp @@ -39,6 +39,8 @@ namespace MWGui public: InventoryWindow(DragAndDrop* dragAndDrop, osgViewer::Viewer* viewer, Resource::ResourceSystem* resourceSystem); + ~InventoryWindow(); + virtual void open(); /// start trading, disables item drag&drop @@ -99,8 +101,8 @@ namespace MWGui int mLastXSize; int mLastYSize; - std::auto_ptr mPreviewTexture; - std::auto_ptr mPreview; + std::unique_ptr mPreviewTexture; + std::unique_ptr mPreview; bool mTrading; diff --git a/apps/openmw/mwgui/loadingscreen.hpp b/apps/openmw/mwgui/loadingscreen.hpp index 194535eee..36d4ef4ec 100644 --- a/apps/openmw/mwgui/loadingscreen.hpp +++ b/apps/openmw/mwgui/loadingscreen.hpp @@ -76,7 +76,7 @@ namespace MWGui // TODO: add releaseGLObjects() for mTexture osg::ref_ptr mTexture; - std::auto_ptr mGuiTexture; + std::unique_ptr mGuiTexture; void changeWallpaper(); diff --git a/apps/openmw/mwgui/mapwindow.hpp b/apps/openmw/mwgui/mapwindow.hpp index 96b39d452..24f392b78 100644 --- a/apps/openmw/mwgui/mapwindow.hpp +++ b/apps/openmw/mwgui/mapwindow.hpp @@ -217,8 +217,8 @@ namespace MWGui void globalMapUpdatePlayer(); MyGUI::ScrollView* mGlobalMap; - std::auto_ptr mGlobalMapTexture; - std::auto_ptr mGlobalMapOverlayTexture; + std::unique_ptr mGlobalMapTexture; + std::unique_ptr mGlobalMapOverlayTexture; MyGUI::ImageBox* mGlobalMapImage; MyGUI::ImageBox* mGlobalMapOverlay; MyGUI::ImageBox* mPlayerArrowLocal; diff --git a/apps/openmw/mwgui/race.cpp b/apps/openmw/mwgui/race.cpp index a65379fca..c997eeb6c 100644 --- a/apps/openmw/mwgui/race.cpp +++ b/apps/openmw/mwgui/race.cpp @@ -112,6 +112,8 @@ namespace MWGui updateSpellPowers(); } + RaceDialog::~RaceDialog() {} + void RaceDialog::setNextButtonShow(bool shown) { MyGUI::Button* okButton; diff --git a/apps/openmw/mwgui/race.hpp b/apps/openmw/mwgui/race.hpp index b3de9bef0..49807d391 100644 --- a/apps/openmw/mwgui/race.hpp +++ b/apps/openmw/mwgui/race.hpp @@ -36,6 +36,8 @@ namespace MWGui public: RaceDialog(osgViewer::Viewer* viewer, Resource::ResourceSystem* resourceSystem); + ~RaceDialog(); + enum Gender { GM_Male, @@ -115,8 +117,8 @@ namespace MWGui float mCurrentAngle; - std::auto_ptr mPreview; - std::auto_ptr mPreviewTexture; + std::unique_ptr mPreview; + std::unique_ptr mPreviewTexture; bool mPreviewDirty; }; diff --git a/apps/openmw/mwgui/savegamedialog.hpp b/apps/openmw/mwgui/savegamedialog.hpp index 6a9e59cc6..be0e47cab 100644 --- a/apps/openmw/mwgui/savegamedialog.hpp +++ b/apps/openmw/mwgui/savegamedialog.hpp @@ -48,7 +48,7 @@ namespace MWGui void fillSaveList(); - std::auto_ptr mScreenshotTexture; + std::unique_ptr mScreenshotTexture; MyGUI::ImageBox* mScreenshot; bool mSaving; diff --git a/apps/openmw/mwgui/spellview.hpp b/apps/openmw/mwgui/spellview.hpp index a4f8ddf39..7fea95cac 100644 --- a/apps/openmw/mwgui/spellview.hpp +++ b/apps/openmw/mwgui/spellview.hpp @@ -56,7 +56,7 @@ namespace MWGui private: MyGUI::ScrollView* mScrollView; - std::auto_ptr mModel; + std::unique_ptr mModel; /// tracks a row in the spell view struct LineInfo diff --git a/apps/openmw/mwgui/videowidget.hpp b/apps/openmw/mwgui/videowidget.hpp index 6b265628e..ac240e69d 100644 --- a/apps/openmw/mwgui/videowidget.hpp +++ b/apps/openmw/mwgui/videowidget.hpp @@ -51,8 +51,8 @@ namespace MWGui private: const VFS::Manager* mVFS; - std::auto_ptr mTexture; - std::auto_ptr mPlayer; + std::unique_ptr mTexture; + std::unique_ptr mPlayer; }; } diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index c275a9f62..3db402de5 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -376,7 +376,7 @@ namespace MWGui osgMyGUI::Platform* mGuiPlatform; osgViewer::Viewer* mViewer; - std::auto_ptr mFontLoader; + std::unique_ptr mFontLoader; bool mConsoleOnlyScripts; diff --git a/apps/openmw/mwmechanics/actor.hpp b/apps/openmw/mwmechanics/actor.hpp index 846af1467..b8e114ead 100644 --- a/apps/openmw/mwmechanics/actor.hpp +++ b/apps/openmw/mwmechanics/actor.hpp @@ -32,7 +32,7 @@ namespace MWMechanics AiState& getAiState(); private: - std::auto_ptr mCharacterController; + std::unique_ptr mCharacterController; AiState mAiState; }; diff --git a/apps/openmw/mwmechanics/aiactivate.cpp b/apps/openmw/mwmechanics/aiactivate.cpp index b0621c805..15303fcce 100644 --- a/apps/openmw/mwmechanics/aiactivate.cpp +++ b/apps/openmw/mwmechanics/aiactivate.cpp @@ -59,7 +59,7 @@ int MWMechanics::AiActivate::getTypeId() const void MWMechanics::AiActivate::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr activate(new ESM::AiSequence::AiActivate()); + std::unique_ptr activate(new ESM::AiSequence::AiActivate()); activate->mTargetId = mObjectId; ESM::AiSequence::AiPackageContainer package; diff --git a/apps/openmw/mwmechanics/aicombat.cpp b/apps/openmw/mwmechanics/aicombat.cpp index 377984f0b..68d477498 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -632,7 +632,7 @@ namespace MWMechanics void AiCombat::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr combat(new ESM::AiSequence::AiCombat()); + std::unique_ptr combat(new ESM::AiSequence::AiCombat()); combat->mTargetActorId = mTargetActorId; ESM::AiSequence::AiPackageContainer package; diff --git a/apps/openmw/mwmechanics/aiescort.cpp b/apps/openmw/mwmechanics/aiescort.cpp index 593f9f173..7ba7f1927 100644 --- a/apps/openmw/mwmechanics/aiescort.cpp +++ b/apps/openmw/mwmechanics/aiescort.cpp @@ -117,7 +117,7 @@ namespace MWMechanics void AiEscort::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr escort(new ESM::AiSequence::AiEscort()); + std::unique_ptr escort(new ESM::AiSequence::AiEscort()); escort->mData.mX = mX; escort->mData.mY = mY; escort->mData.mZ = mZ; diff --git a/apps/openmw/mwmechanics/aifollow.cpp b/apps/openmw/mwmechanics/aifollow.cpp index a92e9eedc..3c2b49d3a 100644 --- a/apps/openmw/mwmechanics/aifollow.cpp +++ b/apps/openmw/mwmechanics/aifollow.cpp @@ -172,7 +172,7 @@ bool AiFollow::isCommanded() const void AiFollow::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr follow(new ESM::AiSequence::AiFollow()); + std::unique_ptr follow(new ESM::AiSequence::AiFollow()); follow->mData.mX = mX; follow->mData.mY = mY; follow->mData.mZ = mZ; diff --git a/apps/openmw/mwmechanics/aipursue.cpp b/apps/openmw/mwmechanics/aipursue.cpp index ac6b23ef6..cb85366c6 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -81,7 +81,7 @@ MWWorld::Ptr AiPursue::getTarget() const void AiPursue::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr pursue(new ESM::AiSequence::AiPursue()); + std::unique_ptr pursue(new ESM::AiSequence::AiPursue()); pursue->mTargetActorId = mTargetActorId; ESM::AiSequence::AiPackageContainer package; diff --git a/apps/openmw/mwmechanics/aitravel.cpp b/apps/openmw/mwmechanics/aitravel.cpp index f192bed63..5ff6af6ef 100644 --- a/apps/openmw/mwmechanics/aitravel.cpp +++ b/apps/openmw/mwmechanics/aitravel.cpp @@ -94,7 +94,7 @@ namespace MWMechanics void AiTravel::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr travel(new ESM::AiSequence::AiTravel()); + std::unique_ptr travel(new ESM::AiSequence::AiTravel()); travel->mData.mX = mX; travel->mData.mY = mY; travel->mData.mZ = mZ; diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index f32636b23..a2034e781 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -726,7 +726,7 @@ namespace MWMechanics void AiWander::writeState(ESM::AiSequence::AiSequence &sequence) const { - std::auto_ptr wander(new ESM::AiSequence::AiWander()); + std::unique_ptr wander(new ESM::AiSequence::AiWander()); wander->mData.mDistance = mDistance; wander->mData.mDuration = mDuration; wander->mData.mTimeOfDay = mTimeOfDay; diff --git a/apps/openmw/mwphysics/actor.cpp b/apps/openmw/mwphysics/actor.cpp index 94d93e7d7..d641c0c4f 100644 --- a/apps/openmw/mwphysics/actor.cpp +++ b/apps/openmw/mwphysics/actor.cpp @@ -19,7 +19,7 @@ namespace MWPhysics Actor::Actor(const MWWorld::Ptr& ptr, osg::ref_ptr shape, btCollisionWorld* world) : mCanWaterWalk(false), mWalkingOnWater(false) - , mCollisionObject(0), mForce(0.f, 0.f, 0.f), mOnGround(false) + , mCollisionObject(nullptr), mForce(0.f, 0.f, 0.f), mOnGround(false) , mInternalCollisionMode(true) , mExternalCollisionMode(true) , mCollisionWorld(world) diff --git a/apps/openmw/mwphysics/actor.hpp b/apps/openmw/mwphysics/actor.hpp index 7a12f549d..b52c36e65 100644 --- a/apps/openmw/mwphysics/actor.hpp +++ b/apps/openmw/mwphysics/actor.hpp @@ -109,9 +109,9 @@ namespace MWPhysics bool mCanWaterWalk; bool mWalkingOnWater; - std::auto_ptr mShape; + std::unique_ptr mShape; - std::auto_ptr mCollisionObject; + std::unique_ptr mCollisionObject; osg::Vec3f mMeshTranslation; osg::Vec3f mHalfExtents; diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 2cb261851..1451d6243 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -587,7 +587,7 @@ namespace MWPhysics } private: - std::auto_ptr mCollisionObject; + std::unique_ptr mCollisionObject; osg::ref_ptr mShapeInstance; }; diff --git a/apps/openmw/mwphysics/physicssystem.hpp b/apps/openmw/mwphysics/physicssystem.hpp index c3b22c385..6da99b96c 100644 --- a/apps/openmw/mwphysics/physicssystem.hpp +++ b/apps/openmw/mwphysics/physicssystem.hpp @@ -145,7 +145,7 @@ namespace MWPhysics btCollisionDispatcher* mDispatcher; btCollisionWorld* mCollisionWorld; - std::auto_ptr mShapeManager; + std::unique_ptr mShapeManager; typedef std::map ObjectMap; ObjectMap mObjects; @@ -176,10 +176,10 @@ namespace MWPhysics float mWaterHeight; float mWaterEnabled; - std::auto_ptr mWaterCollisionObject; - std::auto_ptr mWaterCollisionShape; + std::unique_ptr mWaterCollisionObject; + std::unique_ptr mWaterCollisionShape; - std::auto_ptr mDebugDrawer; + std::unique_ptr mDebugDrawer; osg::ref_ptr mParentNode; diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index 6ce54a4ba..c205953e6 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -111,7 +111,7 @@ void LocalMap::saveFogOfWar(MWWorld::CellStore* cell) if (segment.mFogOfWarImage && segment.mHasFogState) { - std::auto_ptr fog (new ESM::FogState()); + std::unique_ptr fog (new ESM::FogState()); fog->mFogTextures.push_back(ESM::FogTexture()); segment.saveFogOfWar(fog->mFogTextures.back()); @@ -128,7 +128,7 @@ void LocalMap::saveFogOfWar(MWWorld::CellStore* cell) const int segsX = static_cast(std::ceil(length.x() / mMapWorldSize)); const int segsY = static_cast(std::ceil(length.y() / mMapWorldSize)); - std::auto_ptr fog (new ESM::FogState()); + std::unique_ptr fog (new ESM::FogState()); fog->mBounds.mMinX = mBounds.xMin(); fog->mBounds.mMaxX = mBounds.xMax(); diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index bdefdcafa..fd6aa88d5 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -123,7 +123,7 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh, bool { insertBegin(ptr); - std::auto_ptr anim (new ObjectAnimation(ptr, mesh, mResourceSystem, animated, allowLight)); + std::unique_ptr anim (new ObjectAnimation(ptr, mesh, mResourceSystem, animated, allowLight)); if (!allowLight) { @@ -141,7 +141,7 @@ void Objects::insertCreature(const MWWorld::Ptr &ptr, const std::string &mesh, b ptr.getRefData().getBaseNode()->setNodeMask(Mask_Actor); // CreatureAnimation - std::auto_ptr anim; + std::unique_ptr anim; if (weaponsShields) anim.reset(new CreatureWeaponAnimation(ptr, mesh, mResourceSystem)); @@ -156,7 +156,7 @@ void Objects::insertNPC(const MWWorld::Ptr &ptr) insertBegin(ptr); ptr.getRefData().getBaseNode()->setNodeMask(Mask_Actor); - std::auto_ptr anim (new NpcAnimation(ptr, osg::ref_ptr(ptr.getRefData().getBaseNode()), mResourceSystem)); + std::unique_ptr anim (new NpcAnimation(ptr, osg::ref_ptr(ptr.getRefData().getBaseNode()), mResourceSystem)); mObjects.insert(std::make_pair(ptr, anim.release())); } diff --git a/apps/openmw/mwrender/renderingmanager.hpp b/apps/openmw/mwrender/renderingmanager.hpp index def3ea4bb..69b80f174 100644 --- a/apps/openmw/mwrender/renderingmanager.hpp +++ b/apps/openmw/mwrender/renderingmanager.hpp @@ -178,15 +178,15 @@ namespace MWRender osg::ref_ptr mSunLight; - std::auto_ptr mPathgrid; - std::auto_ptr mObjects; - std::auto_ptr mWater; - std::auto_ptr mTerrain; - std::auto_ptr mSky; - std::auto_ptr mEffectManager; - std::auto_ptr mPlayerAnimation; + std::unique_ptr mPathgrid; + std::unique_ptr mObjects; + std::unique_ptr mWater; + std::unique_ptr mTerrain; + std::unique_ptr mSky; + std::unique_ptr mEffectManager; + std::unique_ptr mPlayerAnimation; osg::ref_ptr mPlayerNode; - std::auto_ptr mCamera; + std::unique_ptr mCamera; osg::ref_ptr mStateUpdater; diff --git a/apps/openmw/mwrender/sky.hpp b/apps/openmw/mwrender/sky.hpp index 4d1c73e44..258889300 100644 --- a/apps/openmw/mwrender/sky.hpp +++ b/apps/openmw/mwrender/sky.hpp @@ -122,9 +122,9 @@ namespace MWRender osg::ref_ptr mAtmosphereUpdater; - std::auto_ptr mSun; - std::auto_ptr mMasser; - std::auto_ptr mSecunda; + std::unique_ptr mSun; + std::unique_ptr mMasser; + std::unique_ptr mSecunda; osg::ref_ptr mRainNode; osg::ref_ptr mRainParticleSystem; diff --git a/apps/openmw/mwrender/water.hpp b/apps/openmw/mwrender/water.hpp index 519cd5181..3188cb308 100644 --- a/apps/openmw/mwrender/water.hpp +++ b/apps/openmw/mwrender/water.hpp @@ -41,7 +41,7 @@ namespace MWRender Resource::ResourceSystem* mResourceSystem; osg::ref_ptr mIncrementalCompileOperation; - std::auto_ptr mSimulation; + std::unique_ptr mSimulation; bool mEnabled; bool mToggled; diff --git a/apps/openmw/mwsound/ffmpeg_decoder.cpp b/apps/openmw/mwsound/ffmpeg_decoder.cpp index 6a586e81d..9d225fead 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.cpp +++ b/apps/openmw/mwsound/ffmpeg_decoder.cpp @@ -1,6 +1,6 @@ #include "ffmpeg_decoder.hpp" -// auto_ptr +// unique_ptr #include #include diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openal_output.hpp index 755a0e5b6..548cd5e52 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openal_output.hpp @@ -70,7 +70,7 @@ namespace MWSound virtual ~OpenAL_Output(); struct StreamThread; - std::auto_ptr mStreamThread; + std::unique_ptr mStreamThread; friend class OpenAL_Sound; friend class OpenAL_Sound3D; diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index 2ce60defc..08033e2c1 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -31,7 +31,7 @@ namespace MWSound { const VFS::Manager* mVFS; - std::auto_ptr mOutput; + std::unique_ptr mOutput; // Caches available music tracks by std::map > mMusicFiles; diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index a71672916..d824b9b7e 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -299,7 +299,7 @@ namespace Compiler { // workaround for broken positioncell instructions. /// \todo add option to disable this - std::auto_ptr errorDowngrade (0); + std::unique_ptr errorDowngrade; if (Misc::StringUtils::lowerCase (loc.mLiteral)=="positioncell") errorDowngrade.reset (new ErrorDowngrade (getErrorHandler())); diff --git a/components/esm/aisequence.cpp b/components/esm/aisequence.cpp index 5b36f9a4c..851eb31bc 100644 --- a/components/esm/aisequence.cpp +++ b/components/esm/aisequence.cpp @@ -170,49 +170,49 @@ namespace AiSequence { case Ai_Wander: { - std::auto_ptr ptr (new AiWander()); + std::unique_ptr ptr (new AiWander()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Travel: { - std::auto_ptr ptr (new AiTravel()); + std::unique_ptr ptr (new AiTravel()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Escort: { - std::auto_ptr ptr (new AiEscort()); + std::unique_ptr ptr (new AiEscort()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Follow: { - std::auto_ptr ptr (new AiFollow()); + std::unique_ptr ptr (new AiFollow()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Activate: { - std::auto_ptr ptr (new AiActivate()); + std::unique_ptr ptr (new AiActivate()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Combat: { - std::auto_ptr ptr (new AiCombat()); + std::unique_ptr ptr (new AiCombat()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; } case Ai_Pursue: { - std::auto_ptr ptr (new AiPursue()); + std::unique_ptr ptr (new AiPursue()); ptr->load(esm); mPackages.back().mPackage = ptr.release(); break; diff --git a/components/myguiplatform/myguidatamanager.cpp b/components/myguiplatform/myguidatamanager.cpp index 69bc3878d..485a87ba7 100644 --- a/components/myguiplatform/myguidatamanager.cpp +++ b/components/myguiplatform/myguidatamanager.cpp @@ -18,7 +18,7 @@ void DataManager::setResourcePath(const std::string &path) MyGUI::IDataStream *DataManager::getData(const std::string &name) { std::string fullpath = getDataPath(name); - std::auto_ptr stream; + std::unique_ptr stream; stream.reset(new boost::filesystem::ifstream); stream->open(fullpath, std::ios::binary); if (stream->fail()) diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index adf961dc2..08fa74d84 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -92,7 +92,7 @@ osg::ref_ptr BulletNifLoader::load(const Nif::NIFFilePtr nif) if (findBoundingBox(node)) { - std::auto_ptr compound (new btCompoundShape); + std::unique_ptr compound (new btCompoundShape); btBoxShape* boxShape = new btBoxShape(getbtVector(mShape->mCollisionBoxHalfExtents)); btTransform transform = btTransform::getIdentity(); diff --git a/components/resource/resourcesystem.hpp b/components/resource/resourcesystem.hpp index 7c00a11ee..cb95427dc 100644 --- a/components/resource/resourcesystem.hpp +++ b/components/resource/resourcesystem.hpp @@ -29,8 +29,8 @@ namespace Resource const VFS::Manager* getVFS() const; private: - std::auto_ptr mSceneManager; - std::auto_ptr mTextureManager; + std::unique_ptr mSceneManager; + std::unique_ptr mTextureManager; const VFS::Manager* mVFS; diff --git a/components/sceneutil/skeleton.hpp b/components/sceneutil/skeleton.hpp index d4418fa27..756925fa7 100644 --- a/components/sceneutil/skeleton.hpp +++ b/components/sceneutil/skeleton.hpp @@ -58,7 +58,7 @@ namespace SceneUtil private: // The root bone is not a "real" bone, it has no corresponding node in the scene graph. // As far as the scene graph goes we support multiple root bones. - std::auto_ptr mRootBone; + std::unique_ptr mRootBone; typedef std::map > BoneCache; BoneCache mBoneCache; diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index 5afb99176..9795a81e3 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -73,7 +73,7 @@ void TerrainGrid::loadCell(int x, int y) if (!mStorage->getMinMaxHeights(1, center, minH, maxH)) return; // no terrain defined - std::auto_ptr element (new GridElement); + std::unique_ptr element (new GridElement); osg::Vec2f worldCenter = center*mStorage->getCellWorldSize(); element->mNode = new osg::PositionAttitudeTransform; diff --git a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp b/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp index a592b02d3..95644ea69 100644 --- a/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp +++ b/extern/osg-ffmpeg-videoplayer/audiodecoder.hpp @@ -55,7 +55,7 @@ private: }; - std::auto_ptr mAudioResampler; + std::unique_ptr mAudioResampler; uint8_t *mDataBuf; uint8_t **mFrameData; diff --git a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp index 6324c7c6f..20376ae85 100644 --- a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp +++ b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp @@ -78,7 +78,7 @@ namespace Video private: VideoState* mState; - std::auto_ptr mAudioFactory; + std::unique_ptr mAudioFactory; }; }