diff --git a/apps/opencs/editor.hpp b/apps/opencs/editor.hpp index b088e9a44..ff670ba1b 100644 --- a/apps/opencs/editor.hpp +++ b/apps/opencs/editor.hpp @@ -47,7 +47,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; CSMPrefs::State mSettingsState; diff --git a/apps/opencs/model/doc/document.cpp b/apps/opencs/model/doc/document.cpp index 87fbccb3f..ea32a8457 100644 --- a/apps/opencs/model/doc/document.cpp +++ b/apps/opencs/model/doc/document.cpp @@ -415,9 +415,9 @@ void CSMDoc::Document::runSearch (const CSMWorld::UniversalId& searchId, const C emit stateChanged (getState(), this); } -void CSMDoc::Document::runMerge (std::auto_ptr target) +void CSMDoc::Document::runMerge (std::unique_ptr target) { - mTools.runMerge (target); + mTools.runMerge (std::move(target)); emit stateChanged (getState(), this); } diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index 41640f66d..8a9c49a09 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -137,7 +137,7 @@ namespace CSMDoc void runSearch (const CSMWorld::UniversalId& searchId, const CSMTools::Search& search); - void runMerge (std::auto_ptr target); + void runMerge (std::unique_ptr target); void abortOperation (int type); diff --git a/apps/opencs/model/tools/mergeoperation.cpp b/apps/opencs/model/tools/mergeoperation.cpp index 907d742ed..9b595046a 100644 --- a/apps/opencs/model/tools/mergeoperation.cpp +++ b/apps/opencs/model/tools/mergeoperation.cpp @@ -45,9 +45,9 @@ CSMTools::MergeOperation::MergeOperation (CSMDoc::Document& document, ToUTF8::Fr appendStage (new FinishMergedDocumentStage (mState, encoding)); } -void CSMTools::MergeOperation::setTarget (std::auto_ptr document) +void CSMTools::MergeOperation::setTarget (std::unique_ptr document) { - mState.mTarget = document; + mState.mTarget = std::move(document); } void CSMTools::MergeOperation::operationDone() diff --git a/apps/opencs/model/tools/mergeoperation.hpp b/apps/opencs/model/tools/mergeoperation.hpp index bdaeb2ccd..733fc8eba 100644 --- a/apps/opencs/model/tools/mergeoperation.hpp +++ b/apps/opencs/model/tools/mergeoperation.hpp @@ -27,7 +27,7 @@ namespace CSMTools MergeOperation (CSMDoc::Document& document, ToUTF8::FromType encoding); /// \attention Do not call this function while a merge is running. - void setTarget (std::auto_ptr document); + void setTarget (std::unique_ptr document); protected slots: diff --git a/apps/opencs/model/tools/mergestate.hpp b/apps/opencs/model/tools/mergestate.hpp index 29e1bbda7..96e6752e2 100644 --- a/apps/opencs/model/tools/mergestate.hpp +++ b/apps/opencs/model/tools/mergestate.hpp @@ -12,7 +12,7 @@ namespace CSMTools { struct MergeState { - std::auto_ptr mTarget; + std::unique_ptr mTarget; CSMDoc::Document& mSource; bool mCompleted; std::map, int> mTextureIndices; // (texture, content file) -> new texture diff --git a/apps/opencs/model/tools/tools.cpp b/apps/opencs/model/tools/tools.cpp index f538a716e..3b2c80263 100644 --- a/apps/opencs/model/tools/tools.cpp +++ b/apps/opencs/model/tools/tools.cpp @@ -216,7 +216,7 @@ void CSMTools::Tools::runSearch (const CSMWorld::UniversalId& searchId, const Se mSearch.start(); } -void CSMTools::Tools::runMerge (std::auto_ptr target) +void CSMTools::Tools::runMerge (std::unique_ptr target) { // not setting an active report, because merge does not produce messages @@ -230,7 +230,7 @@ void CSMTools::Tools::runMerge (std::auto_ptr target) target->flagAsDirty(); - mMergeOperation->setTarget (target); + mMergeOperation->setTarget (std::move(target)); mMerge.start(); } diff --git a/apps/opencs/model/tools/tools.hpp b/apps/opencs/model/tools/tools.hpp index e16a3854c..f544c8312 100644 --- a/apps/opencs/model/tools/tools.hpp +++ b/apps/opencs/model/tools/tools.hpp @@ -77,7 +77,7 @@ namespace CSMTools void runSearch (const CSMWorld::UniversalId& searchId, const Search& search); - void runMerge (std::auto_ptr target); + void runMerge (std::unique_ptr target); void abortOperation (int type); ///< \attention The operation is not aborted immediately. diff --git a/apps/opencs/model/world/commanddispatcher.cpp b/apps/opencs/model/world/commanddispatcher.cpp index ffbaa3dec..5d6a35cc5 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 c0ce575b7..31dae256e 100644 --- a/apps/opencs/model/world/refidcollection.cpp +++ b/apps/opencs/model/world/refidcollection.cpp @@ -808,7 +808,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/model/world/refiddata.cpp b/apps/opencs/model/world/refiddata.cpp index 2d8c9ac10..e2ffbcca6 100644 --- a/apps/opencs/model/world/refiddata.cpp +++ b/apps/opencs/model/world/refiddata.cpp @@ -389,7 +389,7 @@ void CSMWorld::RefIdData::copyTo (int index, RefIdData& target) const std::string id = source->getId (localIndex.first); - std::auto_ptr newRecord (source->getRecord (localIndex.first).modifiedCopy()); + std::unique_ptr newRecord (source->getRecord (localIndex.first).modifiedCopy()); target.insertRecord (*newRecord, localIndex.second, id); } diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index 7cf542835..48156359f 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -62,7 +62,7 @@ bool CSVRender::Cell::addObjects (int start, int end) { std::string id = Misc::StringUtils::lowerCase (collection.getRecord (i).get().mId); - std::auto_ptr object (new Object (mData, mCellNode, id, false)); + std::unique_ptr object (new Object (mData, mCellNode, id, false)); if (mSubModeElementMask & Mask_Reference) object->setSubMode (mSubMode); diff --git a/apps/opencs/view/render/cell.hpp b/apps/opencs/view/render/cell.hpp index e8e0d2c63..ca82dd580 100644 --- a/apps/opencs/view/render/cell.hpp +++ b/apps/opencs/view/render/cell.hpp @@ -47,13 +47,13 @@ namespace CSVRender std::string mId; osg::ref_ptr mCellNode; std::map mObjects; - std::auto_ptr mTerrain; + std::unique_ptr mTerrain; CSMWorld::CellCoordinates mCoordinates; - std::auto_ptr mCellArrows[4]; - std::auto_ptr mCellMarker; - std::auto_ptr mCellBorder; - std::auto_ptr mCellWater; - std::auto_ptr mPathgrid; + std::unique_ptr mCellArrows[4]; + std::unique_ptr mCellMarker; + std::unique_ptr mCellBorder; + std::unique_ptr mCellWater; + std::unique_ptr mPathgrid; bool mDeleted; int mSubMode; unsigned int mSubModeElementMask; diff --git a/apps/opencs/view/render/instancemode.cpp b/apps/opencs/view/render/instancemode.cpp index 3373daa4a..fae609af5 100644 --- a/apps/opencs/view/render/instancemode.cpp +++ b/apps/opencs/view/render/instancemode.cpp @@ -559,7 +559,7 @@ void CSVRender::InstanceMode::dropEvent (QDropEvent* event) if (mode=="Create cell and insert") { - std::auto_ptr createCommand ( + std::unique_ptr createCommand ( new CSMWorld::CreateCommand (cellTable, cellId)); int parentIndex = cellTable.findColumnIndex (CSMWorld::Columns::ColumnId_Cell); @@ -610,7 +610,7 @@ void CSVRender::InstanceMode::dropEvent (QDropEvent* event) if (mime->isReferencable (iter->getType())) { // create reference - std::auto_ptr createCommand ( + std::unique_ptr createCommand ( new CSMWorld::CreateCommand ( referencesTable, document.getData().getReferences().getNewId())); diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index e855f7e41..b5497558a 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -54,7 +54,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells() { modified = true; - std::auto_ptr cell (new Cell (mDocument.getData(), mRootNode, + std::unique_ptr cell (new Cell (mDocument.getData(), mRootNode, iter->first.getId (mWorldspace), deleted)); delete iter->second; @@ -378,7 +378,7 @@ void CSVRender::PagedWorldspaceWidget::addCellToScene ( bool deleted = index==-1 || cells.getRecord (index).mState==CSMWorld::RecordBase::State_Deleted; - std::auto_ptr cell ( + std::unique_ptr cell ( new Cell (mDocument.getData(), mRootNode, coordinates.getId (mWorldspace), deleted)); EditMode *editMode = getEditMode(); diff --git a/apps/opencs/view/render/unpagedworldspacewidget.hpp b/apps/opencs/view/render/unpagedworldspacewidget.hpp index 57e8d1a19..5283b3a97 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.hpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.hpp @@ -29,7 +29,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/tools/merge.cpp b/apps/opencs/view/tools/merge.cpp index 566a5ee06..c49044ccd 100644 --- a/apps/opencs/view/tools/merge.cpp +++ b/apps/opencs/view/tools/merge.cpp @@ -127,10 +127,10 @@ void CSVTools::Merge::accept() { std::vector< boost::filesystem::path > files (1, mAdjuster->getPath()); - std::auto_ptr target ( + std::unique_ptr target ( mDocumentManager.makeDocument (files, files[0], true)); - mDocument->runMerge (target); + mDocument->runMerge (std::move(target)); hide(); } 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 87d5b3d7f..7b198056c 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -120,7 +120,7 @@ mIndex(index) CSVWorld::DialogueDelegateDispatcherProxy::DialogueDelegateDispatcherProxy(QWidget* editor, CSMWorld::ColumnBase::Display display) : mEditor(editor), mDisplay(display), -mIndexWrapper(NULL) +mIndexWrapper(nullptr) { } diff --git a/apps/opencs/view/world/dialoguesubview.hpp b/apps/opencs/view/world/dialoguesubview.hpp index bd7116ba2..cbcb9b210 100644 --- a/apps/opencs/view/world/dialoguesubview.hpp +++ b/apps/opencs/view/world/dialoguesubview.hpp @@ -84,7 +84,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 dd2bd82df..bf4c4967f 100644 --- a/apps/opencs/view/world/genericcreator.cpp +++ b/apps/opencs/view/world/genericcreator.cpp @@ -63,7 +63,7 @@ std::string CSVWorld::GenericCreator::getIdValidatorResult() 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()); @@ -224,7 +224,7 @@ void CSVWorld::GenericCreator::create() { std::string id = getId(); - std::auto_ptr command; + std::unique_ptr command; if (mCloneMode) { @@ -239,7 +239,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 f3fc82ec1..60d487bc1 100644 --- a/apps/opencs/view/world/genericcreator.hpp +++ b/apps/opencs/view/world/genericcreator.hpp @@ -71,7 +71,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/openmw/engine.hpp b/apps/openmw/engine.hpp index d06ca594d..29419a4c2 100644 --- a/apps/openmw/engine.hpp +++ b/apps/openmw/engine.hpp @@ -71,8 +71,8 @@ namespace OMW class Engine { SDL_Window* mWindow; - std::auto_ptr mVFS; - std::auto_ptr mResourceSystem; + std::unique_ptr mVFS; + std::unique_ptr mResourceSystem; osg::ref_ptr mWorkQueue; MWBase::Environment mEnvironment; ToUTF8::FromType mEncoding; diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index d0abdad52..420772910 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -310,7 +310,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 fe2899aff..66074306e 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -52,7 +52,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data (new ContainerCustomData); + std::unique_ptr data (new ContainerCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -308,7 +308,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 7c2e05c77..4513e428b 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -108,7 +108,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data (new CreatureCustomData); + std::unique_ptr data (new CreatureCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -742,7 +742,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); if (hasInventoryStore(ptr)) data->mContainerStore = new MWWorld::InventoryStore(); diff --git a/apps/openmw/mwclass/creaturelevlist.cpp b/apps/openmw/mwclass/creaturelevlist.cpp index 5941a09f5..95e52b41e 100644 --- a/apps/openmw/mwclass/creaturelevlist.cpp +++ b/apps/openmw/mwclass/creaturelevlist.cpp @@ -132,7 +132,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 bc3455c65..5f977174f 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -350,7 +350,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 855850dfd..277d1691b 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -303,7 +303,7 @@ namespace MWClass { if (!ptr.getRefData().getCustomData()) { - std::auto_ptr data(new NpcCustomData); + std::unique_ptr data(new NpcCustomData); MWWorld::LiveCellRef *ref = ptr.get(); @@ -1259,7 +1259,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.hpp b/apps/openmw/mwgui/alchemywindow.hpp index 69fff8c67..e1f48d4a3 100644 --- a/apps/openmw/mwgui/alchemywindow.hpp +++ b/apps/openmw/mwgui/alchemywindow.hpp @@ -3,6 +3,8 @@ #include +#include "../mwmechanics/alchemy.hpp" + #include "widgets.hpp" #include "windowbase.hpp" @@ -48,7 +50,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.hpp b/apps/openmw/mwgui/inventorywindow.hpp index 11091c428..761464540 100644 --- a/apps/openmw/mwgui/inventorywindow.hpp +++ b/apps/openmw/mwgui/inventorywindow.hpp @@ -5,6 +5,7 @@ #include "mode.hpp" #include "../mwworld/ptr.hpp" +#include "../mwrender/characterpreview.hpp" namespace osg { @@ -16,11 +17,6 @@ namespace Resource class ResourceSystem; } -namespace MWRender -{ - class InventoryPreview; -} - namespace MWGui { namespace Widgets @@ -101,8 +97,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/itemchargeview.hpp b/apps/openmw/mwgui/itemchargeview.hpp index 0988f655b..956272aec 100644 --- a/apps/openmw/mwgui/itemchargeview.hpp +++ b/apps/openmw/mwgui/itemchargeview.hpp @@ -69,7 +69,7 @@ namespace MWGui typedef std::vector Lines; Lines mLines; - std::auto_ptr mModel; + std::unique_ptr mModel; MyGUI::ScrollView* mScrollView; DisplayMode mDisplayMode; }; diff --git a/apps/openmw/mwgui/loadingscreen.hpp b/apps/openmw/mwgui/loadingscreen.hpp index 0b7edbc9e..100c17e11 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 4e648c4b7..243b1160f 100644 --- a/apps/openmw/mwgui/mapwindow.hpp +++ b/apps/openmw/mwgui/mapwindow.hpp @@ -247,8 +247,8 @@ namespace MWGui void setGlobalMapMarkerTooltip(MyGUI::Widget* widget, int x, int y); 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.hpp b/apps/openmw/mwgui/race.hpp index 42e758983..b762745cd 100644 --- a/apps/openmw/mwgui/race.hpp +++ b/apps/openmw/mwgui/race.hpp @@ -2,6 +2,7 @@ #define MWGUI_RACE_H #include "windowbase.hpp" +#include namespace MWGui @@ -115,8 +116,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 787c88598..ea7b4c14c 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -397,7 +397,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 b1426a4c1..d38a1299f 100644 --- a/apps/openmw/mwmechanics/aiactivate.cpp +++ b/apps/openmw/mwmechanics/aiactivate.cpp @@ -55,7 +55,7 @@ namespace MWMechanics void 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 d111eb127..a7a3d6ad7 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -479,7 +479,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 4c9b5fd4f..103ef32e1 100644 --- a/apps/openmw/mwmechanics/aiescort.cpp +++ b/apps/openmw/mwmechanics/aiescort.cpp @@ -126,7 +126,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 fd3014298..fe94246c4 100644 --- a/apps/openmw/mwmechanics/aifollow.cpp +++ b/apps/openmw/mwmechanics/aifollow.cpp @@ -188,7 +188,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 2b218de03..f9884eb6d 100644 --- a/apps/openmw/mwmechanics/aipursue.cpp +++ b/apps/openmw/mwmechanics/aipursue.cpp @@ -73,7 +73,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/aisequence.cpp b/apps/openmw/mwmechanics/aisequence.cpp index 125805507..64347f161 100644 --- a/apps/openmw/mwmechanics/aisequence.cpp +++ b/apps/openmw/mwmechanics/aisequence.cpp @@ -412,7 +412,7 @@ void AiSequence::readState(const ESM::AiSequence::AiSequence &sequence) for (std::vector::const_iterator it = sequence.mPackages.begin(); it != sequence.mPackages.end(); ++it) { - std::auto_ptr package (NULL); + std::unique_ptr package (nullptr); switch (it->mType) { case ESM::AiSequence::Ai_Wander: diff --git a/apps/openmw/mwmechanics/aitravel.cpp b/apps/openmw/mwmechanics/aitravel.cpp index 7cef7aff1..36b96101f 100644 --- a/apps/openmw/mwmechanics/aitravel.cpp +++ b/apps/openmw/mwmechanics/aitravel.cpp @@ -79,7 +79,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 eba37d7a7..a992bc8d4 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -919,7 +919,7 @@ namespace MWMechanics else remainingDuration = mDuration; - 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 2730bf4f0..e5e36def8 100644 --- a/apps/openmw/mwphysics/actor.cpp +++ b/apps/openmw/mwphysics/actor.cpp @@ -18,7 +18,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(true), mOnSlope(false) + , mCollisionObject(nullptr), mForce(0.f, 0.f, 0.f), mOnGround(false), mOnSlope(false) , mInternalCollisionMode(true) , mExternalCollisionMode(true) , mCollisionWorld(world) diff --git a/apps/openmw/mwphysics/actor.hpp b/apps/openmw/mwphysics/actor.hpp index 88f7f5537..8ec94200f 100644 --- a/apps/openmw/mwphysics/actor.hpp +++ b/apps/openmw/mwphysics/actor.hpp @@ -162,10 +162,10 @@ namespace MWPhysics bool mRotationallyInvariant; - std::auto_ptr mShape; + std::unique_ptr mShape; btConvexShape* mConvexShape; - 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 d209d0d95..790ae2099 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -667,7 +667,7 @@ namespace MWPhysics } private: - std::auto_ptr mCollisionObject; + std::unique_ptr mCollisionObject; osg::ref_ptr mShapeInstance; std::map mRecIndexToNodePath; bool mSolid; diff --git a/apps/openmw/mwphysics/physicssystem.hpp b/apps/openmw/mwphysics/physicssystem.hpp index 5351d99dd..aaf55e2b6 100644 --- a/apps/openmw/mwphysics/physicssystem.hpp +++ b/apps/openmw/mwphysics/physicssystem.hpp @@ -181,7 +181,7 @@ namespace MWPhysics btCollisionDispatcher* mDispatcher; btCollisionWorld* mCollisionWorld; - std::auto_ptr mShapeManager; + std::unique_ptr mShapeManager; Resource::ResourceSystem* mResourceSystem; typedef std::map ObjectMap; @@ -213,10 +213,10 @@ namespace MWPhysics float mWaterHeight; bool 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/characterpreview.cpp b/apps/openmw/mwrender/characterpreview.cpp index db778e88d..b0899f47e 100644 --- a/apps/openmw/mwrender/characterpreview.cpp +++ b/apps/openmw/mwrender/characterpreview.cpp @@ -111,7 +111,7 @@ namespace MWRender , mPosition(position) , mLookAt(lookAt) , mCharacter(character) - , mAnimation(NULL) + , mAnimation(nullptr) , mSizeX(sizeX) , mSizeY(sizeY) { @@ -188,7 +188,7 @@ namespace MWRender mParent->addChild(mCamera); - mCharacter.mCell = NULL; + mCharacter.mCell = nullptr; } CharacterPreview::~CharacterPreview () diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index 02bc5d01f..b78c4dcd2 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -109,7 +109,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()); @@ -126,7 +126,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/renderingmanager.hpp b/apps/openmw/mwrender/renderingmanager.hpp index 075357335..e575456d9 100644 --- a/apps/openmw/mwrender/renderingmanager.hpp +++ b/apps/openmw/mwrender/renderingmanager.hpp @@ -224,16 +224,16 @@ namespace MWRender osg::ref_ptr mSunLight; - std::auto_ptr mPathgrid; - std::auto_ptr mObjects; - std::auto_ptr mWater; - std::auto_ptr mTerrain; + std::unique_ptr mPathgrid; + std::unique_ptr mObjects; + std::unique_ptr mWater; + std::unique_ptr mTerrain; TerrainStorage* mTerrainStorage; - std::auto_ptr mSky; - std::auto_ptr mEffectManager; + std::unique_ptr mSky; + std::unique_ptr mEffectManager; osg::ref_ptr mPlayerAnimation; osg::ref_ptr mPlayerNode; - std::auto_ptr mCamera; + std::unique_ptr mCamera; osg::Vec3f mCurrentCameraPos; osg::ref_ptr mStateUpdater; diff --git a/apps/openmw/mwrender/sky.hpp b/apps/openmw/mwrender/sky.hpp index e047a9832..863ecc77d 100644 --- a/apps/openmw/mwrender/sky.hpp +++ b/apps/openmw/mwrender/sky.hpp @@ -189,9 +189,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/terrainstorage.hpp b/apps/openmw/mwrender/terrainstorage.hpp index cf4011d45..6f716e752 100644 --- a/apps/openmw/mwrender/terrainstorage.hpp +++ b/apps/openmw/mwrender/terrainstorage.hpp @@ -29,7 +29,7 @@ namespace MWRender LandManager* getLandManager() const; private: - std::auto_ptr mLandManager; + std::unique_ptr mLandManager; Resource::ResourceSystem* mResourceSystem; }; diff --git a/apps/openmw/mwrender/water.hpp b/apps/openmw/mwrender/water.hpp index 29e78cf52..33b314c51 100644 --- a/apps/openmw/mwrender/water.hpp +++ b/apps/openmw/mwrender/water.hpp @@ -58,7 +58,7 @@ namespace MWRender const Fallback::Map* mFallback; osg::ref_ptr mIncrementalCompileOperation; - std::auto_ptr mSimulation; + std::unique_ptr mSimulation; osg::ref_ptr mRefraction; osg::ref_ptr mReflection; diff --git a/apps/openmw/mwsound/ffmpeg_decoder.cpp b/apps/openmw/mwsound/ffmpeg_decoder.cpp index 038b2338b..c0a2014b3 100644 --- a/apps/openmw/mwsound/ffmpeg_decoder.cpp +++ b/apps/openmw/mwsound/ffmpeg_decoder.cpp @@ -1,6 +1,5 @@ #include "ffmpeg_decoder.hpp" -// auto_ptr #include #include diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index fb259ff5f..042795a8c 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -217,7 +217,7 @@ private: DecoderPtr mDecoder; - std::auto_ptr mLoudnessAnalyzer; + std::unique_ptr mLoudnessAnalyzer; volatile bool mIsFinished; diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openal_output.hpp index 24c8609d6..ea3f393ff 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openal_output.hpp @@ -33,7 +33,7 @@ namespace MWSound Environment mListenerEnv; struct StreamThread; - std::auto_ptr mStreamThread; + std::unique_ptr mStreamThread; void initCommon2D(ALuint source, const osg::Vec3f &pos, ALfloat gain, ALfloat pitch, bool loop, bool useenv); void initCommon3D(ALuint source, const osg::Vec3f &pos, ALfloat mindist, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool loop, bool useenv); diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index abf5edb97..86e8b2bc7 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -47,8 +47,7 @@ namespace MWSound const VFS::Manager* mVFS; Fallback::Map mFallback; - - std::auto_ptr mOutput; + std::unique_ptr mOutput; // Caches available music tracks by std::map > mMusicFiles; @@ -66,8 +65,7 @@ namespace MWSound float mNearWaterOutdoorTolerance; std::string mNearWaterIndoorID; std::string mNearWaterOutdoorID; - - typedef std::auto_ptr > SoundBufferList; + typedef std::unique_ptr > SoundBufferList; // List of sound buffers, grown as needed. New enties are added to the // back, allowing existing Sound_Buffer references/pointers to remain // valid. diff --git a/apps/openmw/mwworld/scene.hpp b/apps/openmw/mwworld/scene.hpp index f3c2d31ca..586ac4f67 100644 --- a/apps/openmw/mwworld/scene.hpp +++ b/apps/openmw/mwworld/scene.hpp @@ -57,7 +57,7 @@ namespace MWWorld bool mCellChanged; MWPhysics::PhysicsSystem *mPhysics; MWRender::RenderingManager& mRendering; - std::auto_ptr mPreloader; + std::unique_ptr mPreloader; float mPreloadTimer; int mHalfGridSize; float mCellLoadingThreshold; diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index a5b67f58b..c7f82a3d0 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -294,7 +294,7 @@ namespace Compiler { // workaround for broken positioncell instructions. /// \todo add option to disable this - std::auto_ptr errorDowngrade (0); + std::unique_ptr errorDowngrade (nullptr); 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 71f87b170..c39ef8269 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 1cfac15eb..e17c96b79 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -75,7 +75,7 @@ osg::ref_ptr BulletNifLoader::load(const Nif::NIFFilePtr 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.cpp b/components/resource/resourcesystem.cpp index 19b280ff1..74d89ab7a 100644 --- a/components/resource/resourcesystem.cpp +++ b/components/resource/resourcesystem.cpp @@ -28,8 +28,6 @@ namespace Resource // this has to be defined in the .cpp file as we can't delete incomplete types mResourceManagers.clear(); - - // no delete, all handled by auto_ptr } SceneManager* ResourceSystem::getSceneManager() diff --git a/components/resource/resourcesystem.hpp b/components/resource/resourcesystem.hpp index 6e308fd9b..dc608b875 100644 --- a/components/resource/resourcesystem.hpp +++ b/components/resource/resourcesystem.hpp @@ -57,10 +57,10 @@ namespace Resource void reportStats(unsigned int frameNumber, osg::Stats* stats) const; private: - std::auto_ptr mSceneManager; - std::auto_ptr mImageManager; - std::auto_ptr mNifFileManager; - std::auto_ptr mKeyframeManager; + std::unique_ptr mSceneManager; + std::unique_ptr mImageManager; + std::unique_ptr mNifFileManager; + std::unique_ptr mKeyframeManager; // Store the base classes separately to get convenient access to the common interface // Here users can register their own resourcemanager as well diff --git a/components/resource/scenemanager.hpp b/components/resource/scenemanager.hpp index 2da28eaf4..c6ff02acf 100644 --- a/components/resource/scenemanager.hpp +++ b/components/resource/scenemanager.hpp @@ -147,7 +147,7 @@ namespace Resource private: - std::auto_ptr mShaderManager; + std::unique_ptr mShaderManager; bool mForceShaders; bool mClampLighting; bool mForcePerPixelLighting; diff --git a/components/sceneutil/skeleton.hpp b/components/sceneutil/skeleton.hpp index 24dcc6b3f..542471ff1 100644 --- a/components/sceneutil/skeleton.hpp +++ b/components/sceneutil/skeleton.hpp @@ -63,7 +63,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/world.hpp b/components/terrain/world.hpp index 6aac963ce..1eafc8bd7 100644 --- a/components/terrain/world.hpp +++ b/components/terrain/world.hpp @@ -100,8 +100,8 @@ namespace Terrain Resource::ResourceSystem* mResourceSystem; - std::auto_ptr mTextureManager; - std::auto_ptr mChunkManager; + std::unique_ptr mTextureManager; + std::unique_ptr mChunkManager; }; } 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 c118ddb7f..ddb31f306 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; }; } diff --git a/extern/osg-ffmpeg-videoplayer/videostate.hpp b/extern/osg-ffmpeg-videoplayer/videostate.hpp index 2f0e8f30a..0bfe9ba50 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.hpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.hpp @@ -152,8 +152,8 @@ struct VideoState { OpenThreads::Mutex pictq_mutex; OpenThreads::Condition pictq_cond; - std::auto_ptr parse_thread; - std::auto_ptr video_thread; + std::unique_ptr parse_thread; + std::unique_ptr video_thread; volatile bool mSeekRequested; uint64_t mSeekPos;