From ff108b4c6bcbf475dfbdcba4a8439a85964a271a Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 7 Jul 2015 20:20:08 +0200 Subject: [PATCH] replaced boost::shared_ptr with std::shared_ptr --- apps/essimporter/importer.cpp | 72 ++++++++--------- apps/opencs/model/doc/document.hpp | 2 +- apps/opencs/model/filter/andnode.cpp | 2 +- apps/opencs/model/filter/andnode.hpp | 2 +- apps/opencs/model/filter/narynode.cpp | 4 +- apps/opencs/model/filter/narynode.hpp | 6 +- apps/opencs/model/filter/node.hpp | 5 +- apps/opencs/model/filter/notnode.cpp | 2 +- apps/opencs/model/filter/notnode.hpp | 2 +- apps/opencs/model/filter/ornode.cpp | 2 +- apps/opencs/model/filter/ornode.hpp | 2 +- apps/opencs/model/filter/parser.cpp | 78 +++++++++---------- apps/opencs/model/filter/parser.hpp | 14 ++-- apps/opencs/model/filter/unarynode.cpp | 2 +- apps/opencs/model/filter/unarynode.hpp | 6 +- apps/opencs/model/world/data.cpp | 4 +- apps/opencs/model/world/data.hpp | 2 +- .../model/world/idcompletionmanager.cpp | 4 +- .../model/world/idcompletionmanager.hpp | 7 +- apps/opencs/model/world/idtableproxymodel.cpp | 2 +- apps/opencs/model/world/idtableproxymodel.hpp | 6 +- apps/opencs/model/world/land.hpp | 5 +- apps/opencs/view/filter/editwidget.hpp | 4 +- apps/opencs/view/filter/filterbox.cpp | 4 +- apps/opencs/view/filter/filterbox.hpp | 2 +- apps/opencs/view/filter/recordfilterbox.cpp | 4 +- apps/opencs/view/filter/recordfilterbox.hpp | 4 +- apps/opencs/view/render/cell.hpp | 2 +- apps/opencs/view/render/object.hpp | 2 +- apps/opencs/view/render/worldspacewidget.hpp | 2 +- apps/opencs/view/world/table.cpp | 2 +- apps/opencs/view/world/table.hpp | 2 +- apps/opencs/view/world/tablesubview.cpp | 4 +- apps/openmw/mwbase/soundmanager.hpp | 6 +- apps/openmw/mwclass/activator.cpp | 8 +- apps/openmw/mwclass/activator.hpp | 2 +- apps/openmw/mwclass/apparatus.cpp | 8 +- apps/openmw/mwclass/apparatus.hpp | 4 +- apps/openmw/mwclass/armor.cpp | 8 +- apps/openmw/mwclass/armor.hpp | 4 +- apps/openmw/mwclass/book.cpp | 12 +-- apps/openmw/mwclass/book.hpp | 4 +- apps/openmw/mwclass/clothing.cpp | 8 +- apps/openmw/mwclass/clothing.hpp | 4 +- apps/openmw/mwclass/container.cpp | 14 ++-- apps/openmw/mwclass/container.hpp | 2 +- apps/openmw/mwclass/creature.cpp | 12 +-- apps/openmw/mwclass/creature.hpp | 2 +- apps/openmw/mwclass/creaturelevlist.cpp | 2 +- apps/openmw/mwclass/door.cpp | 12 +-- apps/openmw/mwclass/door.hpp | 2 +- apps/openmw/mwclass/ingredient.cpp | 8 +- apps/openmw/mwclass/ingredient.hpp | 4 +- apps/openmw/mwclass/itemlevlist.cpp | 2 +- apps/openmw/mwclass/light.cpp | 12 +-- apps/openmw/mwclass/light.hpp | 4 +- apps/openmw/mwclass/lockpick.cpp | 8 +- apps/openmw/mwclass/lockpick.hpp | 4 +- apps/openmw/mwclass/misc.cpp | 10 +-- apps/openmw/mwclass/misc.hpp | 4 +- apps/openmw/mwclass/npc.cpp | 18 ++--- apps/openmw/mwclass/npc.hpp | 2 +- apps/openmw/mwclass/potion.cpp | 8 +- apps/openmw/mwclass/potion.hpp | 4 +- apps/openmw/mwclass/probe.cpp | 8 +- apps/openmw/mwclass/probe.hpp | 4 +- apps/openmw/mwclass/repair.cpp | 8 +- apps/openmw/mwclass/repair.hpp | 4 +- apps/openmw/mwclass/static.cpp | 2 +- apps/openmw/mwclass/weapon.cpp | 8 +- apps/openmw/mwclass/weapon.hpp | 4 +- apps/openmw/mwgui/bookpage.cpp | 20 ++--- apps/openmw/mwgui/bookpage.hpp | 6 +- apps/openmw/mwgui/inventorywindow.cpp | 2 +- apps/openmw/mwgui/journalviewmodel.cpp | 2 +- apps/openmw/mwgui/journalviewmodel.hpp | 4 +- apps/openmw/mwgui/journalwindow.hpp | 4 +- apps/openmw/mwgui/mapwindow.cpp | 4 +- apps/openmw/mwgui/mapwindow.hpp | 4 +- apps/openmw/mwgui/screenfader.hpp | 4 +- apps/openmw/mwmechanics/aicombat.cpp | 4 +- apps/openmw/mwmechanics/aicombat.hpp | 2 +- apps/openmw/mwmechanics/aicombataction.cpp | 4 +- apps/openmw/mwmechanics/aicombataction.hpp | 8 +- apps/openmw/mwrender/animation.cpp | 12 +-- apps/openmw/mwrender/animation.hpp | 18 ++--- apps/openmw/mwrender/creatureanimation.cpp | 4 +- apps/openmw/mwrender/creatureanimation.hpp | 2 +- apps/openmw/mwrender/effectmanager.hpp | 5 +- apps/openmw/mwrender/npcanimation.cpp | 6 +- apps/openmw/mwrender/npcanimation.hpp | 4 +- apps/openmw/mwrender/ripplesimulation.cpp | 2 +- apps/openmw/mwrender/sky.cpp | 2 +- apps/openmw/mwrender/water.cpp | 2 +- apps/openmw/mwscript/interpretercontext.cpp | 2 +- apps/openmw/mwscript/interpretercontext.hpp | 2 +- apps/openmw/mwsound/movieaudiofactory.cpp | 6 +- apps/openmw/mwsound/movieaudiofactory.hpp | 2 +- apps/openmw/mwsound/openal_output.cpp | 6 +- apps/openmw/mwsound/soundmanagerimp.hpp | 4 +- apps/openmw/mwworld/cellstore.hpp | 4 +- apps/openmw/mwworld/class.cpp | 22 +++--- apps/openmw/mwworld/class.hpp | 13 ++-- apps/openmw/mwworld/projectilemanager.hpp | 2 +- apps/openmw/mwworld/worldimp.hpp | 4 +- components/files/constrainedfilestream.hpp | 4 +- components/nif/niffile.hpp | 2 +- components/nif/nifkey.hpp | 12 +-- components/nif/recordptr.hpp | 5 +- components/nifosg/controller.hpp | 2 +- components/nifosg/nifloader.cpp | 6 +- components/resource/texturemanager.cpp | 2 + components/sceneutil/controller.cpp | 10 +-- components/sceneutil/controller.hpp | 18 ++--- components/vfs/manager.cpp | 1 + .../osg-ffmpeg-videoplayer/audiofactory.hpp | 4 +- extern/osg-ffmpeg-videoplayer/videoplayer.cpp | 2 +- extern/osg-ffmpeg-videoplayer/videoplayer.hpp | 4 +- extern/osg-ffmpeg-videoplayer/videostate.cpp | 2 +- extern/osg-ffmpeg-videoplayer/videostate.hpp | 6 +- 120 files changed, 389 insertions(+), 386 deletions(-) diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index 32ad1816c..85adf9470 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -2,7 +2,7 @@ #include -#include + #include #include @@ -260,37 +260,37 @@ namespace ESSImport const unsigned int recGAME = ESM::FourCC<'G','A','M','E'>::value; const unsigned int recJOUR = ESM::FourCC<'J','O','U','R'>::value; - std::map > converters; - converters[ESM::REC_GLOB] = boost::shared_ptr(new ConvertGlobal()); - converters[ESM::REC_BOOK] = boost::shared_ptr(new ConvertBook()); - converters[ESM::REC_NPC_] = boost::shared_ptr(new ConvertNPC()); - converters[ESM::REC_CREA] = boost::shared_ptr(new ConvertCREA()); - converters[ESM::REC_NPCC] = boost::shared_ptr(new ConvertNPCC()); - converters[ESM::REC_CREC] = boost::shared_ptr(new ConvertCREC()); - converters[recREFR ] = boost::shared_ptr(new ConvertREFR()); - converters[recPCDT ] = boost::shared_ptr(new ConvertPCDT()); - converters[recFMAP ] = boost::shared_ptr(new ConvertFMAP()); - converters[recKLST ] = boost::shared_ptr(new ConvertKLST()); - converters[recSTLN ] = boost::shared_ptr(new ConvertSTLN()); - converters[recGAME ] = boost::shared_ptr(new ConvertGAME()); - converters[ESM::REC_CELL] = boost::shared_ptr(new ConvertCell()); - converters[ESM::REC_ALCH] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_CLAS] = boost::shared_ptr(new ConvertClass()); - converters[ESM::REC_SPEL] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_ARMO] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_WEAP] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_CLOT] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_ENCH] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_WEAP] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_LEVC] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_LEVI] = boost::shared_ptr(new DefaultConverter()); - converters[ESM::REC_CNTC] = boost::shared_ptr(new ConvertCNTC()); - converters[ESM::REC_FACT] = boost::shared_ptr(new ConvertFACT()); - converters[ESM::REC_INFO] = boost::shared_ptr(new ConvertINFO()); - converters[ESM::REC_DIAL] = boost::shared_ptr(new ConvertDIAL()); - converters[ESM::REC_QUES] = boost::shared_ptr(new ConvertQUES()); - converters[recJOUR ] = boost::shared_ptr(new ConvertJOUR()); - converters[ESM::REC_SCPT] = boost::shared_ptr(new ConvertSCPT()); + std::map > converters; + converters[ESM::REC_GLOB] = std::shared_ptr(new ConvertGlobal()); + converters[ESM::REC_BOOK] = std::shared_ptr(new ConvertBook()); + converters[ESM::REC_NPC_] = std::shared_ptr(new ConvertNPC()); + converters[ESM::REC_CREA] = std::shared_ptr(new ConvertCREA()); + converters[ESM::REC_NPCC] = std::shared_ptr(new ConvertNPCC()); + converters[ESM::REC_CREC] = std::shared_ptr(new ConvertCREC()); + converters[recREFR ] = std::shared_ptr(new ConvertREFR()); + converters[recPCDT ] = std::shared_ptr(new ConvertPCDT()); + converters[recFMAP ] = std::shared_ptr(new ConvertFMAP()); + converters[recKLST ] = std::shared_ptr(new ConvertKLST()); + converters[recSTLN ] = std::shared_ptr(new ConvertSTLN()); + converters[recGAME ] = std::shared_ptr(new ConvertGAME()); + converters[ESM::REC_CELL] = std::shared_ptr(new ConvertCell()); + converters[ESM::REC_ALCH] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_CLAS] = std::shared_ptr(new ConvertClass()); + converters[ESM::REC_SPEL] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_ARMO] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_WEAP] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_CLOT] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_ENCH] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_WEAP] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_LEVC] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_LEVI] = std::shared_ptr(new DefaultConverter()); + converters[ESM::REC_CNTC] = std::shared_ptr(new ConvertCNTC()); + converters[ESM::REC_FACT] = std::shared_ptr(new ConvertFACT()); + converters[ESM::REC_INFO] = std::shared_ptr(new ConvertINFO()); + converters[ESM::REC_DIAL] = std::shared_ptr(new ConvertDIAL()); + converters[ESM::REC_QUES] = std::shared_ptr(new ConvertQUES()); + converters[recJOUR ] = std::shared_ptr(new ConvertJOUR()); + converters[ESM::REC_SCPT] = std::shared_ptr(new ConvertSCPT()); // TODO: // - REGN (weather in certain regions?) @@ -300,7 +300,7 @@ namespace ESSImport std::set unknownRecords; - for (std::map >::const_iterator it = converters.begin(); + for (std::map >::const_iterator it = converters.begin(); it != converters.end(); ++it) { it->second->setContext(context); @@ -311,7 +311,7 @@ namespace ESSImport ESM::NAME n = esm.getRecName(); esm.getRecHeader(); - std::map >::iterator it = converters.find(n.val); + std::map >::iterator it = converters.find(n.val); if (it != converters.end()) { it->second->read(esm); @@ -370,7 +370,7 @@ namespace ESSImport // Writing order should be Dynamic Store -> Cells -> Player, // so that references to dynamic records can be recognized when loading - for (std::map >::const_iterator it = converters.begin(); + for (std::map >::const_iterator it = converters.begin(); it != converters.end(); ++it) { if (it->second->getStage() != 0) @@ -383,7 +383,7 @@ namespace ESSImport context.mPlayerBase.save(writer); writer.endRecord(ESM::REC_NPC_); - for (std::map >::const_iterator it = converters.begin(); + for (std::map >::const_iterator it = converters.begin(); it != converters.end(); ++it) { if (it->second->getStage() != 1) diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index c9271fa54..1c0bafb68 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -3,7 +3,7 @@ #include -#include + #include #include diff --git a/apps/opencs/model/filter/andnode.cpp b/apps/opencs/model/filter/andnode.cpp index 4249fc228..4eddfaeaa 100644 --- a/apps/opencs/model/filter/andnode.cpp +++ b/apps/opencs/model/filter/andnode.cpp @@ -3,7 +3,7 @@ #include -CSMFilter::AndNode::AndNode (const std::vector >& nodes) +CSMFilter::AndNode::AndNode (const std::vector >& nodes) : NAryNode (nodes, "and") {} diff --git a/apps/opencs/model/filter/andnode.hpp b/apps/opencs/model/filter/andnode.hpp index 3838b451d..56d1d7948 100644 --- a/apps/opencs/model/filter/andnode.hpp +++ b/apps/opencs/model/filter/andnode.hpp @@ -9,7 +9,7 @@ namespace CSMFilter { public: - AndNode (const std::vector >& nodes); + AndNode (const std::vector >& nodes); virtual bool test (const CSMWorld::IdTableBase& table, int row, const std::map& columns) const; diff --git a/apps/opencs/model/filter/narynode.cpp b/apps/opencs/model/filter/narynode.cpp index 98f706c87..c8a104519 100644 --- a/apps/opencs/model/filter/narynode.cpp +++ b/apps/opencs/model/filter/narynode.cpp @@ -3,7 +3,7 @@ #include -CSMFilter::NAryNode::NAryNode (const std::vector >& nodes, +CSMFilter::NAryNode::NAryNode (const std::vector >& nodes, const std::string& name) : mNodes (nodes), mName (name) {} @@ -22,7 +22,7 @@ std::vector CSMFilter::NAryNode::getReferencedColumns() const { std::vector columns; - for (std::vector >::const_iterator iter (mNodes.begin()); + for (std::vector >::const_iterator iter (mNodes.begin()); iter!=mNodes.end(); ++iter) { std::vector columns2 = (*iter)->getReferencedColumns(); diff --git a/apps/opencs/model/filter/narynode.hpp b/apps/opencs/model/filter/narynode.hpp index aa501d009..a545b99d3 100644 --- a/apps/opencs/model/filter/narynode.hpp +++ b/apps/opencs/model/filter/narynode.hpp @@ -4,7 +4,7 @@ #include #include -#include + #include "node.hpp" @@ -12,12 +12,12 @@ namespace CSMFilter { class NAryNode : public Node { - std::vector > mNodes; + std::vector > mNodes; std::string mName; public: - NAryNode (const std::vector >& nodes, const std::string& name); + NAryNode (const std::vector >& nodes, const std::string& name); int getSize() const; diff --git a/apps/opencs/model/filter/node.hpp b/apps/opencs/model/filter/node.hpp index 58588bdc5..2baa7e563 100644 --- a/apps/opencs/model/filter/node.hpp +++ b/apps/opencs/model/filter/node.hpp @@ -4,8 +4,7 @@ #include #include #include - -#include +#include #include @@ -48,6 +47,6 @@ namespace CSMFilter }; } -Q_DECLARE_METATYPE (boost::shared_ptr) +Q_DECLARE_METATYPE (std::shared_ptr) #endif diff --git a/apps/opencs/model/filter/notnode.cpp b/apps/opencs/model/filter/notnode.cpp index b5d9da7b7..2ec956a2a 100644 --- a/apps/opencs/model/filter/notnode.cpp +++ b/apps/opencs/model/filter/notnode.cpp @@ -1,7 +1,7 @@ #include "notnode.hpp" -CSMFilter::NotNode::NotNode (boost::shared_ptr child) : UnaryNode (child, "not") {} +CSMFilter::NotNode::NotNode (std::shared_ptr child) : UnaryNode (child, "not") {} bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row, const std::map& columns) const diff --git a/apps/opencs/model/filter/notnode.hpp b/apps/opencs/model/filter/notnode.hpp index 0281d99da..e3c57cede 100644 --- a/apps/opencs/model/filter/notnode.hpp +++ b/apps/opencs/model/filter/notnode.hpp @@ -9,7 +9,7 @@ namespace CSMFilter { public: - NotNode (boost::shared_ptr child); + NotNode (std::shared_ptr child); virtual bool test (const CSMWorld::IdTableBase& table, int row, const std::map& columns) const; diff --git a/apps/opencs/model/filter/ornode.cpp b/apps/opencs/model/filter/ornode.cpp index c5d15a384..06858143a 100644 --- a/apps/opencs/model/filter/ornode.cpp +++ b/apps/opencs/model/filter/ornode.cpp @@ -3,7 +3,7 @@ #include -CSMFilter::OrNode::OrNode (const std::vector >& nodes) +CSMFilter::OrNode::OrNode (const std::vector >& nodes) : NAryNode (nodes, "or") {} diff --git a/apps/opencs/model/filter/ornode.hpp b/apps/opencs/model/filter/ornode.hpp index 07ab51a6a..b89da4e75 100644 --- a/apps/opencs/model/filter/ornode.hpp +++ b/apps/opencs/model/filter/ornode.hpp @@ -9,7 +9,7 @@ namespace CSMFilter { public: - OrNode (const std::vector >& nodes); + OrNode (const std::vector >& nodes); virtual bool test (const CSMWorld::IdTableBase& table, int row, const std::map& columns) const; diff --git a/apps/opencs/model/filter/parser.cpp b/apps/opencs/model/filter/parser.cpp index 51338dfc9..647a6ee41 100644 --- a/apps/opencs/model/filter/parser.cpp +++ b/apps/opencs/model/filter/parser.cpp @@ -236,7 +236,7 @@ CSMFilter::Token CSMFilter::Parser::getNextToken() return Token (Token::Type_None); } -boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot) +std::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot) { if (Token token = getNextToken()) { @@ -248,11 +248,11 @@ boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, { case Token::Type_Keyword_True: - return boost::shared_ptr (new BooleanNode (true)); + return std::shared_ptr (new BooleanNode (true)); case Token::Type_Keyword_False: - return boost::shared_ptr (new BooleanNode (false)); + return std::shared_ptr (new BooleanNode (false)); case Token::Type_Keyword_And: case Token::Type_Keyword_Or: @@ -261,12 +261,12 @@ boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, case Token::Type_Keyword_Not: { - boost::shared_ptr node = parseImp(); + std::shared_ptr node = parseImp(); if (mError) - return boost::shared_ptr(); + return std::shared_ptr(); - return boost::shared_ptr (new NotNode (node)); + return std::shared_ptr (new NotNode (node)); } case Token::Type_Keyword_Text: @@ -282,7 +282,7 @@ boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, if (!allowEmpty) error(); - return boost::shared_ptr(); + return std::shared_ptr(); default: @@ -290,27 +290,27 @@ boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, } } - return boost::shared_ptr(); + return std::shared_ptr(); } -boost::shared_ptr CSMFilter::Parser::parseNAry (const Token& keyword) +std::shared_ptr CSMFilter::Parser::parseNAry (const Token& keyword) { - std::vector > nodes; + std::vector > nodes; Token token = getNextToken(); if (token.mType!=Token::Type_Open) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } for (;;) { - boost::shared_ptr node = parseImp(); + std::shared_ptr node = parseImp(); if (mError) - return boost::shared_ptr(); + return std::shared_ptr(); nodes.push_back (node); @@ -319,7 +319,7 @@ boost::shared_ptr CSMFilter::Parser::parseNAry (const Token& ke if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma)) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } if (token.mType==Token::Type_Close) @@ -329,31 +329,31 @@ boost::shared_ptr CSMFilter::Parser::parseNAry (const Token& ke if (nodes.empty()) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } switch (keyword.mType) { - case Token::Type_Keyword_And: return boost::shared_ptr (new AndNode (nodes)); - case Token::Type_Keyword_Or: return boost::shared_ptr (new OrNode (nodes)); - default: error(); return boost::shared_ptr(); + case Token::Type_Keyword_And: return std::shared_ptr (new AndNode (nodes)); + case Token::Type_Keyword_Or: return std::shared_ptr (new OrNode (nodes)); + default: error(); return std::shared_ptr(); } } -boost::shared_ptr CSMFilter::Parser::parseText() +std::shared_ptr CSMFilter::Parser::parseText() { Token token = getNextToken(); if (token.mType!=Token::Type_Open) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); if (!token) - return boost::shared_ptr(); + return std::shared_ptr(); // parse column ID int columnId = -1; @@ -371,7 +371,7 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (columnId<0) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -379,7 +379,7 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (token.mType!=Token::Type_Comma) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } // parse text pattern @@ -388,7 +388,7 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (!token.isString()) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } std::string text = token.mString; @@ -398,26 +398,26 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (token.mType!=Token::Type_Close) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } - return boost::shared_ptr (new TextNode (columnId, text)); + return std::shared_ptr (new TextNode (columnId, text)); } -boost::shared_ptr CSMFilter::Parser::parseValue() +std::shared_ptr CSMFilter::Parser::parseValue() { Token token = getNextToken(); if (token.mType!=Token::Type_Open) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); if (!token) - return boost::shared_ptr(); + return std::shared_ptr(); // parse column ID int columnId = -1; @@ -435,7 +435,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (columnId<0) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -443,7 +443,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (token.mType!=Token::Type_Comma) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } // parse value @@ -468,7 +468,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -482,7 +482,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (token.mType!=Token::Type_Comma) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } } else if (token.mType==Token::Type_Comma) @@ -492,7 +492,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() else { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -514,7 +514,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } } @@ -523,10 +523,10 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (token.mType!=Token::Type_Close) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } - return boost::shared_ptr (new ValueNode (columnId, lowerType, upperType, lower, upper)); + return std::shared_ptr (new ValueNode (columnId, lowerType, upperType, lower, upper)); } void CSMFilter::Parser::error() @@ -557,7 +557,7 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined) } else if (!allowPredefined || token==Token (Token::Type_OneShot)) { - boost::shared_ptr node = parseImp (true, token!=Token (Token::Type_OneShot)); + std::shared_ptr node = parseImp (true, token!=Token (Token::Type_OneShot)); if (mError) return false; @@ -613,7 +613,7 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined) } } -boost::shared_ptr CSMFilter::Parser::getFilter() const +std::shared_ptr CSMFilter::Parser::getFilter() const { if (mError) throw std::logic_error ("No filter available"); diff --git a/apps/opencs/model/filter/parser.hpp b/apps/opencs/model/filter/parser.hpp index 5700102cf..68a869ffe 100644 --- a/apps/opencs/model/filter/parser.hpp +++ b/apps/opencs/model/filter/parser.hpp @@ -1,7 +1,7 @@ #ifndef CSM_FILTER_PARSER_H #define CSM_FILTER_PARSER_H -#include + #include "node.hpp" @@ -16,7 +16,7 @@ namespace CSMFilter class Parser { - boost::shared_ptr mFilter; + std::shared_ptr mFilter; std::string mInput; int mIndex; bool mError; @@ -31,14 +31,14 @@ namespace CSMFilter Token checkKeywords (const Token& token); ///< Turn string token into keyword token, if possible. - boost::shared_ptr parseImp (bool allowEmpty = false, bool ignoreOneShot = false); + std::shared_ptr parseImp (bool allowEmpty = false, bool ignoreOneShot = false); ///< Will return a null-pointer, if there is nothing more to parse. - boost::shared_ptr parseNAry (const Token& keyword); + std::shared_ptr parseNAry (const Token& keyword); - boost::shared_ptr parseText(); + std::shared_ptr parseText(); - boost::shared_ptr parseValue(); + std::shared_ptr parseValue(); void error(); @@ -51,7 +51,7 @@ namespace CSMFilter /// /// \return Success? - boost::shared_ptr getFilter() const; + std::shared_ptr getFilter() const; ///< Throws an exception if the last call to parse did not return true. }; } diff --git a/apps/opencs/model/filter/unarynode.cpp b/apps/opencs/model/filter/unarynode.cpp index c40d191b6..f6e6914cb 100644 --- a/apps/opencs/model/filter/unarynode.cpp +++ b/apps/opencs/model/filter/unarynode.cpp @@ -1,7 +1,7 @@ #include "unarynode.hpp" -CSMFilter::UnaryNode::UnaryNode (boost::shared_ptr child, const std::string& name) +CSMFilter::UnaryNode::UnaryNode (std::shared_ptr child, const std::string& name) : mChild (child), mName (name) {} diff --git a/apps/opencs/model/filter/unarynode.hpp b/apps/opencs/model/filter/unarynode.hpp index 6bbc96092..0a99b397d 100644 --- a/apps/opencs/model/filter/unarynode.hpp +++ b/apps/opencs/model/filter/unarynode.hpp @@ -1,7 +1,7 @@ #ifndef CSM_FILTER_UNARYNODE_H #define CSM_FILTER_UNARYNODE_H -#include + #include "node.hpp" @@ -9,12 +9,12 @@ namespace CSMFilter { class UnaryNode : public Node { - boost::shared_ptr mChild; + std::shared_ptr mChild; std::string mName; public: - UnaryNode (boost::shared_ptr child, const std::string& name); + UnaryNode (std::shared_ptr child, const std::string& name); const Node& getChild() const; diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index a92a7ad79..b166eaae3 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -858,7 +858,7 @@ void CSMWorld::Data::merge() int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base, bool project) { // Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading - boost::shared_ptr ptr(mReader); + std::shared_ptr ptr(mReader); mReaders.push_back(ptr); mReader = 0; @@ -896,7 +896,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages) // Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading. // We don't store non-base reader, because everything going into modified will be // fully loaded during the initial loading process. - boost::shared_ptr ptr(mReader); + std::shared_ptr ptr(mReader); mReaders.push_back(ptr); } else diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 6e651b374..cb8d38d7b 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -115,7 +115,7 @@ namespace CSMWorld Resource::ResourceSystem mResourceSystem; - std::vector > mReaders; + std::vector > mReaders; // not implemented Data (const Data&); diff --git a/apps/opencs/model/world/idcompletionmanager.cpp b/apps/opencs/model/world/idcompletionmanager.cpp index 20cd8652c..434df5a0b 100644 --- a/apps/opencs/model/world/idcompletionmanager.cpp +++ b/apps/opencs/model/world/idcompletionmanager.cpp @@ -73,7 +73,7 @@ bool CSMWorld::IdCompletionManager::hasCompleterFor(CSMWorld::ColumnBase::Displa return mCompleters.find(display) != mCompleters.end(); } -boost::shared_ptr CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display) +std::shared_ptr CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display) { if (!hasCompleterFor(display)) { @@ -95,7 +95,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data) int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id); if (idColumn != -1) { - boost::shared_ptr completer = boost::make_shared(table); + std::shared_ptr completer = std::make_shared(table); completer->setCompletionColumn(idColumn); // The completion role must be Qt::DisplayRole to get the ID values from the model completer->setCompletionRole(Qt::DisplayRole); diff --git a/apps/opencs/model/world/idcompletionmanager.hpp b/apps/opencs/model/world/idcompletionmanager.hpp index 7944e6777..e48360432 100644 --- a/apps/opencs/model/world/idcompletionmanager.hpp +++ b/apps/opencs/model/world/idcompletionmanager.hpp @@ -3,8 +3,7 @@ #include #include - -#include +#include #include "columnbase.hpp" #include "universalid.hpp" @@ -20,7 +19,7 @@ namespace CSMWorld { static const std::map sCompleterModelTypes; - std::map > mCompleters; + std::map > mCompleters; // Don't allow copying IdCompletionManager(const IdCompletionManager &); @@ -34,7 +33,7 @@ namespace CSMWorld IdCompletionManager(Data &data); bool hasCompleterFor(ColumnBase::Display display) const; - boost::shared_ptr getCompleter(ColumnBase::Display display); + std::shared_ptr getCompleter(ColumnBase::Display display); }; } diff --git a/apps/opencs/model/world/idtableproxymodel.cpp b/apps/opencs/model/world/idtableproxymodel.cpp index 516644713..5eb867a31 100644 --- a/apps/opencs/model/world/idtableproxymodel.cpp +++ b/apps/opencs/model/world/idtableproxymodel.cpp @@ -50,7 +50,7 @@ QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, i return mapFromSource (dynamic_cast (*sourceModel()).getModelIndex (id, column)); } -void CSMWorld::IdTableProxyModel::setFilter (const boost::shared_ptr& filter) +void CSMWorld::IdTableProxyModel::setFilter (const std::shared_ptr& filter) { beginResetModel(); mFilter = filter; diff --git a/apps/opencs/model/world/idtableproxymodel.hpp b/apps/opencs/model/world/idtableproxymodel.hpp index d2a240529..70c35d171 100644 --- a/apps/opencs/model/world/idtableproxymodel.hpp +++ b/apps/opencs/model/world/idtableproxymodel.hpp @@ -3,7 +3,7 @@ #include -#include + #include @@ -17,7 +17,7 @@ namespace CSMWorld { Q_OBJECT - boost::shared_ptr mFilter; + std::shared_ptr mFilter; std::map mColumnMap; // column ID, column index in this model (or -1) private: @@ -30,7 +30,7 @@ namespace CSMWorld virtual QModelIndex getModelIndex (const std::string& id, int column) const; - void setFilter (const boost::shared_ptr& filter); + void setFilter (const std::shared_ptr& filter); void refreshFilter(); diff --git a/apps/opencs/model/world/land.hpp b/apps/opencs/model/world/land.hpp index e97a2d7dd..98a827d9a 100644 --- a/apps/opencs/model/world/land.hpp +++ b/apps/opencs/model/world/land.hpp @@ -2,7 +2,8 @@ #define CSM_WORLD_LAND_H #include -#include +#include + #include namespace CSMWorld @@ -15,7 +16,7 @@ namespace CSMWorld { Land(); - boost::shared_ptr mLand; + std::shared_ptr mLand; std::string mId; diff --git a/apps/opencs/view/filter/editwidget.hpp b/apps/opencs/view/filter/editwidget.hpp index a0f9f8919..6ffbd720e 100644 --- a/apps/opencs/view/filter/editwidget.hpp +++ b/apps/opencs/view/filter/editwidget.hpp @@ -1,7 +1,7 @@ #ifndef CSV_FILTER_EDITWIDGET_H #define CSV_FILTER_EDITWIDGET_H -#include + #include #include @@ -35,7 +35,7 @@ namespace CSVFilter signals: - void filterChanged (boost::shared_ptr filter); + void filterChanged (std::shared_ptr filter); private: std::string generateFilter(std::pair >& seekedString) const; diff --git a/apps/opencs/view/filter/filterbox.cpp b/apps/opencs/view/filter/filterbox.cpp index 7a42ef0a5..5867b7554 100644 --- a/apps/opencs/view/filter/filterbox.cpp +++ b/apps/opencs/view/filter/filterbox.cpp @@ -22,8 +22,8 @@ CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent) setLayout (layout); connect (mRecordFilterBox, - SIGNAL (filterChanged (boost::shared_ptr)), - this, SIGNAL (recordFilterChanged (boost::shared_ptr))); + SIGNAL (filterChanged (std::shared_ptr)), + this, SIGNAL (recordFilterChanged (std::shared_ptr))); setAcceptDrops(true); } diff --git a/apps/opencs/view/filter/filterbox.hpp b/apps/opencs/view/filter/filterbox.hpp index c765164e7..e794a9880 100644 --- a/apps/opencs/view/filter/filterbox.hpp +++ b/apps/opencs/view/filter/filterbox.hpp @@ -41,7 +41,7 @@ namespace CSVFilter void dragMoveEvent(QDragMoveEvent *event); signals: - void recordFilterChanged (boost::shared_ptr filter); + void recordFilterChanged (std::shared_ptr filter); void recordDropped (std::vector& types, Qt::DropAction action); }; diff --git a/apps/opencs/view/filter/recordfilterbox.cpp b/apps/opencs/view/filter/recordfilterbox.cpp index 97490d508..fd7763fdc 100644 --- a/apps/opencs/view/filter/recordfilterbox.cpp +++ b/apps/opencs/view/filter/recordfilterbox.cpp @@ -24,8 +24,8 @@ CSVFilter::RecordFilterBox::RecordFilterBox (CSMWorld::Data& data, QWidget *pare setLayout (layout); connect ( - mEdit, SIGNAL (filterChanged (boost::shared_ptr)), - this, SIGNAL (filterChanged (boost::shared_ptr))); + mEdit, SIGNAL (filterChanged (std::shared_ptr)), + this, SIGNAL (filterChanged (std::shared_ptr))); } void CSVFilter::RecordFilterBox::setFilter (const std::string& filter) diff --git a/apps/opencs/view/filter/recordfilterbox.hpp b/apps/opencs/view/filter/recordfilterbox.hpp index 29d12529a..2483fef9f 100644 --- a/apps/opencs/view/filter/recordfilterbox.hpp +++ b/apps/opencs/view/filter/recordfilterbox.hpp @@ -1,7 +1,7 @@ #ifndef CSV_FILTER_RECORDFILTERBOX_H #define CSV_FILTER_RECORDFILTERBOX_H -#include + #include #include @@ -38,7 +38,7 @@ namespace CSVFilter signals: - void filterChanged (boost::shared_ptr filter); + void filterChanged (std::shared_ptr filter); }; } diff --git a/apps/opencs/view/render/cell.hpp b/apps/opencs/view/render/cell.hpp index f4272b887..ebc369bec 100644 --- a/apps/opencs/view/render/cell.hpp +++ b/apps/opencs/view/render/cell.hpp @@ -5,7 +5,7 @@ #include #include -#include + #include diff --git a/apps/opencs/view/render/object.hpp b/apps/opencs/view/render/object.hpp index 9f411ffc6..bf91f04f8 100644 --- a/apps/opencs/view/render/object.hpp +++ b/apps/opencs/view/render/object.hpp @@ -3,7 +3,7 @@ #include -#include + #include diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index fe4555820..992294496 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -1,7 +1,7 @@ #ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H #define OPENCS_VIEW_WORLDSPACEWIDGET_H -#include + #include "scenewidget.hpp" diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 74343a5f6..68e048c97 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -672,7 +672,7 @@ void CSVWorld::Table::requestFocus (const std::string& id) scrollTo (index, QAbstractItemView::PositionAtTop); } -void CSVWorld::Table::recordFilterChanged (boost::shared_ptr filter) +void CSVWorld::Table::recordFilterChanged (std::shared_ptr filter) { mProxyModel->setFilter (filter); tableSizeUpdate(); diff --git a/apps/opencs/view/world/table.hpp b/apps/opencs/view/world/table.hpp index adacd3a9d..2491af318 100644 --- a/apps/opencs/view/world/table.hpp +++ b/apps/opencs/view/world/table.hpp @@ -136,7 +136,7 @@ namespace CSVWorld void requestFocus (const std::string& id); - void recordFilterChanged (boost::shared_ptr filter); + void recordFilterChanged (std::shared_ptr filter); void updateUserSetting (const QString &name, const QStringList &list); diff --git a/apps/opencs/view/world/tablesubview.cpp b/apps/opencs/view/world/tablesubview.cpp index 75671a50c..648fce0cd 100644 --- a/apps/opencs/view/world/tablesubview.cpp +++ b/apps/opencs/view/world/tablesubview.cpp @@ -76,8 +76,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D mTable, SLOT (requestFocus (const std::string&))); connect (mFilterBox, - SIGNAL (recordFilterChanged (boost::shared_ptr)), - mTable, SLOT (recordFilterChanged (boost::shared_ptr))); + SIGNAL (recordFilterChanged (std::shared_ptr)), + mTable, SLOT (recordFilterChanged (std::shared_ptr))); connect(mFilterBox, SIGNAL(recordDropped(std::vector&, Qt::DropAction)), this, SLOT(createFilterRequest(std::vector&, Qt::DropAction))); diff --git a/apps/openmw/mwbase/soundmanager.hpp b/apps/openmw/mwbase/soundmanager.hpp index 4fccec40b..a70c5dd99 100644 --- a/apps/openmw/mwbase/soundmanager.hpp +++ b/apps/openmw/mwbase/soundmanager.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "../mwworld/ptr.hpp" @@ -16,12 +16,12 @@ namespace MWSound { class Sound; struct Sound_Decoder; - typedef boost::shared_ptr DecoderPtr; + typedef std::shared_ptr DecoderPtr; } namespace MWBase { - typedef boost::shared_ptr SoundPtr; + typedef std::shared_ptr SoundPtr; /// \brief Interface for sound manager (implemented in MWSound) class SoundManager diff --git a/apps/openmw/mwclass/activator.cpp b/apps/openmw/mwclass/activator.cpp index 4cf33ceb8..8b6e2593d 100644 --- a/apps/openmw/mwclass/activator.cpp +++ b/apps/openmw/mwclass/activator.cpp @@ -77,7 +77,7 @@ namespace MWClass void Activator::registerSelf() { - boost::shared_ptr instance (new Activator); + std::shared_ptr instance (new Activator); registerClass (typeid (ESM::Activator).name(), instance); } @@ -109,19 +109,19 @@ namespace MWClass return info; } - boost::shared_ptr Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const + std::shared_ptr Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const { if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) { const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfActivator"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; } - return boost::shared_ptr(new MWWorld::NullAction); + return std::shared_ptr(new MWWorld::NullAction); } diff --git a/apps/openmw/mwclass/activator.hpp b/apps/openmw/mwclass/activator.hpp index 646bb79bb..f1e68f42c 100644 --- a/apps/openmw/mwclass/activator.hpp +++ b/apps/openmw/mwclass/activator.hpp @@ -34,7 +34,7 @@ namespace MWClass virtual std::string getScript (const MWWorld::Ptr& ptr) const; ///< Return name of the script attached to ptr - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation static void registerSelf(); diff --git a/apps/openmw/mwclass/apparatus.cpp b/apps/openmw/mwclass/apparatus.cpp index 6f11a36c7..0a5d9f04f 100644 --- a/apps/openmw/mwclass/apparatus.cpp +++ b/apps/openmw/mwclass/apparatus.cpp @@ -59,7 +59,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Apparatus::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Apparatus::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -83,7 +83,7 @@ namespace MWClass void Apparatus::registerSelf() { - boost::shared_ptr instance (new Apparatus); + std::shared_ptr instance (new Apparatus); registerClass (typeid (ESM::Apparatus).name(), instance); } @@ -138,9 +138,9 @@ namespace MWClass } - boost::shared_ptr Apparatus::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Apparatus::use (const MWWorld::Ptr& ptr) const { - return boost::shared_ptr(new MWWorld::ActionAlchemy()); + return std::shared_ptr(new MWWorld::ActionAlchemy()); } MWWorld::Ptr diff --git a/apps/openmw/mwclass/apparatus.hpp b/apps/openmw/mwclass/apparatus.hpp index 94e998e48..719ddab06 100644 --- a/apps/openmw/mwclass/apparatus.hpp +++ b/apps/openmw/mwclass/apparatus.hpp @@ -27,7 +27,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -54,7 +54,7 @@ namespace MWClass virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const; ///< Return name of inventory icon. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/armor.cpp b/apps/openmw/mwclass/armor.cpp index 04c98e437..ee84c450e 100644 --- a/apps/openmw/mwclass/armor.cpp +++ b/apps/openmw/mwclass/armor.cpp @@ -64,7 +64,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Armor::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Armor::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -180,7 +180,7 @@ namespace MWClass void Armor::registerSelf() { - boost::shared_ptr instance (new Armor); + std::shared_ptr instance (new Armor); registerClass (typeid (ESM::Armor).name(), instance); } @@ -367,9 +367,9 @@ namespace MWClass return std::make_pair(1,""); } - boost::shared_ptr Armor::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Armor::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/armor.hpp b/apps/openmw/mwclass/armor.hpp index ec3290878..ad39bc760 100644 --- a/apps/openmw/mwclass/armor.hpp +++ b/apps/openmw/mwclass/armor.hpp @@ -26,7 +26,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -77,7 +77,7 @@ namespace MWClass ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. \n /// Second item in the pair specifies the error message - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index 2c20435b2..a0a6dddaa 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -61,7 +61,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Book::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Book::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) @@ -69,13 +69,13 @@ namespace MWClass const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfItem"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; } - return boost::shared_ptr(new MWWorld::ActionRead(ptr)); + return std::shared_ptr(new MWWorld::ActionRead(ptr)); } std::string Book::getScript (const MWWorld::Ptr& ptr) const @@ -96,7 +96,7 @@ namespace MWClass void Book::registerSelf() { - boost::shared_ptr instance (new Book); + std::shared_ptr instance (new Book); registerClass (typeid (ESM::Book).name(), instance); } @@ -176,9 +176,9 @@ namespace MWClass return record->mId; } - boost::shared_ptr Book::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Book::use (const MWWorld::Ptr& ptr) const { - return boost::shared_ptr(new MWWorld::ActionRead(ptr)); + return std::shared_ptr(new MWWorld::ActionRead(ptr)); } MWWorld::Ptr diff --git a/apps/openmw/mwclass/book.hpp b/apps/openmw/mwclass/book.hpp index 8dcae731a..3c1510f56 100644 --- a/apps/openmw/mwclass/book.hpp +++ b/apps/openmw/mwclass/book.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -57,7 +57,7 @@ namespace MWClass virtual std::string applyEnchantment(const MWWorld::Ptr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) const; + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu virtual std::string getModel(const MWWorld::Ptr &ptr) const; diff --git a/apps/openmw/mwclass/clothing.cpp b/apps/openmw/mwclass/clothing.cpp index 8964b65e0..78a2adca2 100644 --- a/apps/openmw/mwclass/clothing.cpp +++ b/apps/openmw/mwclass/clothing.cpp @@ -61,7 +61,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Clothing::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Clothing::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -136,7 +136,7 @@ namespace MWClass void Clothing::registerSelf() { - boost::shared_ptr instance (new Clothing); + std::shared_ptr instance (new Clothing); registerClass (typeid (ESM::Clothing).name(), instance); } @@ -262,9 +262,9 @@ namespace MWClass return std::make_pair (1, ""); } - boost::shared_ptr Clothing::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Clothing::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/clothing.hpp b/apps/openmw/mwclass/clothing.hpp index adb349158..7b130187d 100644 --- a/apps/openmw/mwclass/clothing.hpp +++ b/apps/openmw/mwclass/clothing.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -69,7 +69,7 @@ namespace MWClass ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. /// Second item in the pair specifies the error message - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/container.cpp b/apps/openmw/mwclass/container.cpp index 862ae6c5d..5e5af511f 100644 --- a/apps/openmw/mwclass/container.cpp +++ b/apps/openmw/mwclass/container.cpp @@ -117,18 +117,18 @@ namespace MWClass return ""; } - boost::shared_ptr Container::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Container::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory)) - return boost::shared_ptr (new MWWorld::NullAction ()); + return std::shared_ptr (new MWWorld::NullAction ()); if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) { const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfContainer"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; @@ -171,20 +171,20 @@ namespace MWClass { if(ptr.getCellRef().getTrap().empty()) { - boost::shared_ptr action (new MWWorld::ActionOpen(ptr)); + std::shared_ptr action (new MWWorld::ActionOpen(ptr)); return action; } else { // Activate trap - boost::shared_ptr action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); + std::shared_ptr action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); action->setSound(trapActivationSound); return action; } } else { - boost::shared_ptr action(new MWWorld::FailedAction); + std::shared_ptr action(new MWWorld::FailedAction); action->setSound(lockedSound); return action; } @@ -216,7 +216,7 @@ namespace MWClass void Container::registerSelf() { - boost::shared_ptr instance (new Container); + std::shared_ptr instance (new Container); registerClass (typeid (ESM::Container).name(), instance); } diff --git a/apps/openmw/mwclass/container.hpp b/apps/openmw/mwclass/container.hpp index 3268d45d1..11eb7169f 100644 --- a/apps/openmw/mwclass/container.hpp +++ b/apps/openmw/mwclass/container.hpp @@ -27,7 +27,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index f312a41c7..16051dcd1 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -450,7 +450,7 @@ namespace MWClass } - boost::shared_ptr Creature::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Creature::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) @@ -458,17 +458,17 @@ namespace MWClass const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfCreature"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; } if(getCreatureStats(ptr).isDead()) - return boost::shared_ptr(new MWWorld::ActionOpen(ptr, true)); + return std::shared_ptr(new MWWorld::ActionOpen(ptr, true)); if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat()) - return boost::shared_ptr(new MWWorld::FailedAction("")); - return boost::shared_ptr(new MWWorld::ActionTalk(ptr)); + return std::shared_ptr(new MWWorld::FailedAction("")); + return std::shared_ptr(new MWWorld::ActionTalk(ptr)); } MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const @@ -512,7 +512,7 @@ namespace MWClass void Creature::registerSelf() { - boost::shared_ptr instance (new Creature); + std::shared_ptr instance (new Creature); registerClass (typeid (ESM::Creature).name(), instance); } diff --git a/apps/openmw/mwclass/creature.hpp b/apps/openmw/mwclass/creature.hpp index 740552a60..fd7ef866c 100644 --- a/apps/openmw/mwclass/creature.hpp +++ b/apps/openmw/mwclass/creature.hpp @@ -74,7 +74,7 @@ namespace MWClass virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const; - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation diff --git a/apps/openmw/mwclass/creaturelevlist.cpp b/apps/openmw/mwclass/creaturelevlist.cpp index dbc4b6af7..aca820fd1 100644 --- a/apps/openmw/mwclass/creaturelevlist.cpp +++ b/apps/openmw/mwclass/creaturelevlist.cpp @@ -47,7 +47,7 @@ namespace MWClass void CreatureLevList::registerSelf() { - boost::shared_ptr instance (new CreatureLevList); + std::shared_ptr instance (new CreatureLevList); registerClass (typeid (ESM::CreatureLevList).name(), instance); } diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index 5a8c736d9..a06c681c5 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -95,7 +95,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Door::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Door::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { MWWorld::LiveCellRef *ref = ptr.get(); @@ -139,14 +139,14 @@ namespace MWClass if(!ptr.getCellRef().getTrap().empty()) { // Trap activation - boost::shared_ptr action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); + std::shared_ptr action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); action->setSound(trapActivationSound); return action; } if (ptr.getCellRef().getTeleport()) { - boost::shared_ptr action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true)); + std::shared_ptr action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true)); action->setSound(openSound); @@ -155,7 +155,7 @@ namespace MWClass else { // animated door - boost::shared_ptr action(new MWWorld::ActionDoor(ptr)); + std::shared_ptr action(new MWWorld::ActionDoor(ptr)); int doorstate = getDoorState(ptr); bool opening = true; if (doorstate == 1) @@ -188,7 +188,7 @@ namespace MWClass else { // locked, and we can't open. - boost::shared_ptr action(new MWWorld::FailedAction); + std::shared_ptr action(new MWWorld::FailedAction); action->setSound(lockedSound); return action; } @@ -217,7 +217,7 @@ namespace MWClass void Door::registerSelf() { - boost::shared_ptr instance (new Door); + std::shared_ptr instance (new Door); registerClass (typeid (ESM::Door).name(), instance); } diff --git a/apps/openmw/mwclass/door.hpp b/apps/openmw/mwclass/door.hpp index 9cfb46509..8aa4e7af4 100644 --- a/apps/openmw/mwclass/door.hpp +++ b/apps/openmw/mwclass/door.hpp @@ -28,7 +28,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation diff --git a/apps/openmw/mwclass/ingredient.cpp b/apps/openmw/mwclass/ingredient.cpp index fb409cb55..2d81972c8 100644 --- a/apps/openmw/mwclass/ingredient.cpp +++ b/apps/openmw/mwclass/ingredient.cpp @@ -65,7 +65,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Ingredient::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Ingredient::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -88,9 +88,9 @@ namespace MWClass } - boost::shared_ptr Ingredient::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Ingredient::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action (new MWWorld::ActionEat (ptr)); + std::shared_ptr action (new MWWorld::ActionEat (ptr)); action->setSound ("Swallow"); @@ -99,7 +99,7 @@ namespace MWClass void Ingredient::registerSelf() { - boost::shared_ptr instance (new Ingredient); + std::shared_ptr instance (new Ingredient); registerClass (typeid (ESM::Ingredient).name(), instance); } diff --git a/apps/openmw/mwclass/ingredient.hpp b/apps/openmw/mwclass/ingredient.hpp index 69dd70743..975bcb21d 100644 --- a/apps/openmw/mwclass/ingredient.hpp +++ b/apps/openmw/mwclass/ingredient.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -40,7 +40,7 @@ namespace MWClass virtual int getValue (const MWWorld::Ptr& ptr) const; ///< Return trade value of the object. Throws an exception, if the object can't be traded. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/itemlevlist.cpp b/apps/openmw/mwclass/itemlevlist.cpp index d31080bb2..e7f6c59f2 100644 --- a/apps/openmw/mwclass/itemlevlist.cpp +++ b/apps/openmw/mwclass/itemlevlist.cpp @@ -17,7 +17,7 @@ namespace MWClass void ItemLevList::registerSelf() { - boost::shared_ptr instance (new ItemLevList); + std::shared_ptr instance (new ItemLevList); registerClass (typeid (ESM::ItemLevList).name(), instance); } diff --git a/apps/openmw/mwclass/light.cpp b/apps/openmw/mwclass/light.cpp index 1e882b568..e17e5315d 100644 --- a/apps/openmw/mwclass/light.cpp +++ b/apps/openmw/mwclass/light.cpp @@ -83,15 +83,15 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Light::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Light::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { if(!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory)) - return boost::shared_ptr(new MWWorld::NullAction()); + return std::shared_ptr(new MWWorld::NullAction()); MWWorld::LiveCellRef *ref = ptr.get(); if(!(ref->mBase->mData.mFlags&ESM::Light::Carry)) - return boost::shared_ptr(new MWWorld::FailedAction()); + return std::shared_ptr(new MWWorld::FailedAction()); return defaultItemActivate(ptr, actor); } @@ -127,7 +127,7 @@ namespace MWClass void Light::registerSelf() { - boost::shared_ptr instance (new Light); + std::shared_ptr instance (new Light); registerClass (typeid (ESM::Light).name(), instance); } @@ -186,9 +186,9 @@ namespace MWClass return info; } - boost::shared_ptr Light::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Light::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/light.hpp b/apps/openmw/mwclass/light.hpp index 6161f1899..b66993e7f 100644 --- a/apps/openmw/mwclass/light.hpp +++ b/apps/openmw/mwclass/light.hpp @@ -30,7 +30,7 @@ namespace MWClass virtual MWGui::ToolTipInfo getToolTipInfo (const MWWorld::Ptr& ptr) const; ///< @return the content of the tool tip to be displayed. raises exception if the object has no tooltip. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -55,7 +55,7 @@ namespace MWClass virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const; ///< Return name of inventory icon. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/lockpick.cpp b/apps/openmw/mwclass/lockpick.cpp index 8f22c3fa1..17c468686 100644 --- a/apps/openmw/mwclass/lockpick.cpp +++ b/apps/openmw/mwclass/lockpick.cpp @@ -60,7 +60,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Lockpick::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Lockpick::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -93,7 +93,7 @@ namespace MWClass void Lockpick::registerSelf() { - boost::shared_ptr instance (new Lockpick); + std::shared_ptr instance (new Lockpick); registerClass (typeid (ESM::Lockpick).name(), instance); } @@ -152,9 +152,9 @@ namespace MWClass return info; } - boost::shared_ptr Lockpick::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Lockpick::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/lockpick.hpp b/apps/openmw/mwclass/lockpick.hpp index 3f2c004f8..5800c9c76 100644 --- a/apps/openmw/mwclass/lockpick.hpp +++ b/apps/openmw/mwclass/lockpick.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -55,7 +55,7 @@ namespace MWClass virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const; ///< Return name of inventory icon. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index b7c39b50a..d3798b1c3 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -77,7 +77,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Miscellaneous::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Miscellaneous::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -111,7 +111,7 @@ namespace MWClass void Miscellaneous::registerSelf() { - boost::shared_ptr instance (new Miscellaneous); + std::shared_ptr instance (new Miscellaneous); registerClass (typeid (ESM::Miscellaneous).name(), instance); } @@ -231,12 +231,12 @@ namespace MWClass return newPtr; } - boost::shared_ptr Miscellaneous::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Miscellaneous::use (const MWWorld::Ptr& ptr) const { if (ptr.getCellRef().getSoul().empty()) - return boost::shared_ptr(new MWWorld::NullAction()); + return std::shared_ptr(new MWWorld::NullAction()); else - return boost::shared_ptr(new MWWorld::ActionSoulgem(ptr)); + return std::shared_ptr(new MWWorld::ActionSoulgem(ptr)); } bool Miscellaneous::canSell (const MWWorld::Ptr& item, int npcServices) const diff --git a/apps/openmw/mwclass/misc.hpp b/apps/openmw/mwclass/misc.hpp index 66699f9df..abb0f8471 100644 --- a/apps/openmw/mwclass/misc.hpp +++ b/apps/openmw/mwclass/misc.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -53,7 +53,7 @@ namespace MWClass virtual std::string getModel(const MWWorld::Ptr &ptr) const; - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index c7b407fb8..e2ef47808 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -804,12 +804,12 @@ namespace MWClass } - boost::shared_ptr Npc::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Npc::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { // player got activated by another NPC if(ptr == MWBase::Environment::get().getWorld()->getPlayerPtr()) - return boost::shared_ptr(new MWWorld::ActionTalk(actor)); + return std::shared_ptr(new MWWorld::ActionTalk(actor)); // Werewolfs can't activate NPCs if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) @@ -817,23 +817,23 @@ namespace MWClass const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfNPC"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; } if(getCreatureStats(ptr).isDead()) - return boost::shared_ptr(new MWWorld::ActionOpen(ptr, true)); + return std::shared_ptr(new MWWorld::ActionOpen(ptr, true)); if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat()) - return boost::shared_ptr(new MWWorld::FailedAction("#{sActorInCombat}")); + return std::shared_ptr(new MWWorld::FailedAction("#{sActorInCombat}")); if(getCreatureStats(actor).getStance(MWMechanics::CreatureStats::Stance_Sneak) || ptr.getClass().getCreatureStats(ptr).getKnockedDown()) - return boost::shared_ptr(new MWWorld::ActionOpen(ptr)); // stealing + return std::shared_ptr(new MWWorld::ActionOpen(ptr)); // stealing // Can't talk to werewolfs if(ptr.getClass().isNpc() && ptr.getClass().getNpcStats(ptr).isWerewolf()) - return boost::shared_ptr (new MWWorld::FailedAction("")); - return boost::shared_ptr(new MWWorld::ActionTalk(ptr)); + return std::shared_ptr (new MWWorld::FailedAction("")); + return std::shared_ptr(new MWWorld::ActionTalk(ptr)); } MWWorld::ContainerStore& Npc::getContainerStore (const MWWorld::Ptr& ptr) @@ -981,7 +981,7 @@ namespace MWClass void Npc::registerSelf() { - boost::shared_ptr instance (new Npc); + std::shared_ptr instance (new Npc); registerClass (typeid (ESM::NPC).name(), instance); } diff --git a/apps/openmw/mwclass/npc.hpp b/apps/openmw/mwclass/npc.hpp index f032ae77c..6a17899a3 100644 --- a/apps/openmw/mwclass/npc.hpp +++ b/apps/openmw/mwclass/npc.hpp @@ -89,7 +89,7 @@ namespace MWClass virtual void setActorHealth(const MWWorld::Ptr& ptr, float health, const MWWorld::Ptr& attacker) const; - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 647f83f67..62ae097c4 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -63,7 +63,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Potion::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Potion::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -87,7 +87,7 @@ namespace MWClass void Potion::registerSelf() { - boost::shared_ptr instance (new Potion); + std::shared_ptr instance (new Potion); registerClass (typeid (ESM::Potion).name(), instance); } @@ -160,12 +160,12 @@ namespace MWClass return info; } - boost::shared_ptr Potion::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Potion::use (const MWWorld::Ptr& ptr) const { MWWorld::LiveCellRef *ref = ptr.get(); - boost::shared_ptr action ( + std::shared_ptr action ( new MWWorld::ActionApply (ptr, ref->mBase->mId)); action->setSound ("Drink"); diff --git a/apps/openmw/mwclass/potion.hpp b/apps/openmw/mwclass/potion.hpp index 091d29195..d9b6d5bb3 100644 --- a/apps/openmw/mwclass/potion.hpp +++ b/apps/openmw/mwclass/potion.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -40,7 +40,7 @@ namespace MWClass virtual int getValue (const MWWorld::Ptr& ptr) const; ///< Return trade value of the object. Throws an exception, if the object can't be traded. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) const; + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu static void registerSelf(); diff --git a/apps/openmw/mwclass/probe.cpp b/apps/openmw/mwclass/probe.cpp index cb43ccce6..b01033f11 100644 --- a/apps/openmw/mwclass/probe.cpp +++ b/apps/openmw/mwclass/probe.cpp @@ -59,7 +59,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Probe::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Probe::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -92,7 +92,7 @@ namespace MWClass void Probe::registerSelf() { - boost::shared_ptr instance (new Probe); + std::shared_ptr instance (new Probe); registerClass (typeid (ESM::Probe).name(), instance); } @@ -151,9 +151,9 @@ namespace MWClass return info; } - boost::shared_ptr Probe::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Probe::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/probe.hpp b/apps/openmw/mwclass/probe.hpp index e39e43c27..c1945fbf0 100644 --- a/apps/openmw/mwclass/probe.hpp +++ b/apps/openmw/mwclass/probe.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -55,7 +55,7 @@ namespace MWClass virtual std::string getInventoryIcon (const MWWorld::Ptr& ptr) const; ///< Return name of inventory icon. - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwclass/repair.cpp b/apps/openmw/mwclass/repair.cpp index 0bc64a99e..cb70ed44e 100644 --- a/apps/openmw/mwclass/repair.cpp +++ b/apps/openmw/mwclass/repair.cpp @@ -59,7 +59,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Repair::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Repair::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -83,7 +83,7 @@ namespace MWClass void Repair::registerSelf() { - boost::shared_ptr instance (new Repair); + std::shared_ptr instance (new Repair); registerClass (typeid (ESM::Repair).name(), instance); } @@ -164,9 +164,9 @@ namespace MWClass return MWWorld::Ptr(&cell.get().insert(*ref), &cell); } - boost::shared_ptr Repair::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Repair::use (const MWWorld::Ptr& ptr) const { - return boost::shared_ptr(new MWWorld::ActionRepair(ptr)); + return std::shared_ptr(new MWWorld::ActionRepair(ptr)); } bool Repair::canSell (const MWWorld::Ptr& item, int npcServices) const diff --git a/apps/openmw/mwclass/repair.hpp b/apps/openmw/mwclass/repair.hpp index 295b9d4f1..3f371ca0d 100644 --- a/apps/openmw/mwclass/repair.hpp +++ b/apps/openmw/mwclass/repair.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -53,7 +53,7 @@ namespace MWClass virtual std::string getModel(const MWWorld::Ptr &ptr) const; - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu (default implementation: return a /// null action). diff --git a/apps/openmw/mwclass/static.cpp b/apps/openmw/mwclass/static.cpp index 6438046de..3588d20eb 100644 --- a/apps/openmw/mwclass/static.cpp +++ b/apps/openmw/mwclass/static.cpp @@ -50,7 +50,7 @@ namespace MWClass void Static::registerSelf() { - boost::shared_ptr instance (new Static); + std::shared_ptr instance (new Static); registerClass (typeid (ESM::Static).name(), instance); } diff --git a/apps/openmw/mwclass/weapon.cpp b/apps/openmw/mwclass/weapon.cpp index 8c3d7fb10..4adcfe6b6 100644 --- a/apps/openmw/mwclass/weapon.cpp +++ b/apps/openmw/mwclass/weapon.cpp @@ -63,7 +63,7 @@ namespace MWClass return ref->mBase->mName; } - boost::shared_ptr Weapon::activate (const MWWorld::Ptr& ptr, + std::shared_ptr Weapon::activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const { return defaultItemActivate(ptr, actor); @@ -157,7 +157,7 @@ namespace MWClass void Weapon::registerSelf() { - boost::shared_ptr instance (new Weapon); + std::shared_ptr instance (new Weapon); registerClass (typeid (ESM::Weapon).name(), instance); } @@ -403,9 +403,9 @@ namespace MWClass return std::make_pair(1, ""); } - boost::shared_ptr Weapon::use (const MWWorld::Ptr& ptr) const + std::shared_ptr Weapon::use (const MWWorld::Ptr& ptr) const { - boost::shared_ptr action(new MWWorld::ActionEquip(ptr)); + std::shared_ptr action(new MWWorld::ActionEquip(ptr)); action->setSound(getUpSoundId(ptr)); diff --git a/apps/openmw/mwclass/weapon.hpp b/apps/openmw/mwclass/weapon.hpp index 47c1157a0..0b4a13f88 100644 --- a/apps/openmw/mwclass/weapon.hpp +++ b/apps/openmw/mwclass/weapon.hpp @@ -24,7 +24,7 @@ namespace MWClass ///< \return name (the one that is to be presented to the user; not the internal one); /// can return an empty string. - virtual boost::shared_ptr activate (const MWWorld::Ptr& ptr, + virtual std::shared_ptr activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; ///< Generate action for activation @@ -75,7 +75,7 @@ namespace MWClass ///< Return 0 if player cannot equip item. 1 if can equip. 2 if it's twohanded weapon. 3 if twohanded weapon conflicts with that. /// Second item in the pair specifies the error message - virtual boost::shared_ptr use (const MWWorld::Ptr& ptr) + virtual std::shared_ptr use (const MWWorld::Ptr& ptr) const; ///< Generate action for using via inventory menu diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index cfb49ebff..2d06f5195 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -8,7 +8,7 @@ #include #include -#include + #include #include @@ -207,7 +207,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter }; typedef TypesetBookImpl Book; - typedef boost::shared_ptr BookPtr; + typedef std::shared_ptr BookPtr; typedef std::vector::const_iterator PartialTextConstIterator; int mPageWidth; @@ -231,7 +231,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter mCurrentContent (NULL), mCurrentAlignment (AlignLeft) { - mBook = boost::make_shared (); + mBook = std::make_shared (); } virtual ~Typesetter () @@ -254,7 +254,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter style.mActiveColour = fontColour; style.mNormalColour = fontColour; style.mInteractiveId = 0; - + return &style; } @@ -315,7 +315,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter writeImpl (static_cast (style), begin_, end_); } - + void lineBreak (float margin) { assert (margin == 0); //TODO: figure out proper behavior here... @@ -325,7 +325,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter mRun = NULL; mLine = NULL; } - + void sectionBreak (int margin) { add_partial_text(); @@ -597,7 +597,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter BookTypesetter::Ptr BookTypesetter::create (int pageWidth, int pageHeight) { - return boost::make_shared (pageWidth, pageHeight); + return std::make_shared (pageWidth, pageHeight); } namespace @@ -869,7 +869,7 @@ public: boost::function mLinkClicked; - boost::shared_ptr mBook; + std::shared_ptr mBook; MyGUI::ILayerNode* mNode; ActiveTextFormats mActiveTextFormats; @@ -990,7 +990,7 @@ public: void showPage (TypesetBook::Ptr book, size_t newPage) { - boost::shared_ptr newBook = boost::dynamic_pointer_cast (book); + std::shared_ptr newBook = std::dynamic_pointer_cast (book); if (mBook != newBook) { @@ -1079,7 +1079,7 @@ public: } }; - void createActiveFormats (boost::shared_ptr newBook) + void createActiveFormats (std::shared_ptr newBook) { newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this)); diff --git a/apps/openmw/mwgui/bookpage.hpp b/apps/openmw/mwgui/bookpage.hpp index c7340ec7c..f5d7ae4bb 100644 --- a/apps/openmw/mwgui/bookpage.hpp +++ b/apps/openmw/mwgui/bookpage.hpp @@ -7,7 +7,7 @@ #include #include #include -#include + namespace MWGui { @@ -15,7 +15,7 @@ namespace MWGui /// the book page widget. struct TypesetBook { - typedef boost::shared_ptr Ptr; + typedef std::shared_ptr Ptr; typedef intptr_t InteractiveId; /// Returns the number of pages in the document. @@ -33,7 +33,7 @@ namespace MWGui /// A factory class for creating a typeset book instance. struct BookTypesetter { - typedef boost::shared_ptr Ptr; + typedef std::shared_ptr Ptr; typedef TypesetBook::InteractiveId InteractiveId; typedef MyGUI::Colour Colour; typedef uint8_t const * Utf8Point; diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 3ecfc64b2..fa57ee1a6 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -449,7 +449,7 @@ namespace MWGui if (script.empty() || ptr.getRefData().getLocals().getIntVar(script, "pcskipequip") == 0) { - boost::shared_ptr action = ptr.getClass().use(ptr); + std::shared_ptr action = ptr.getClass().use(ptr); action->execute (MWBase::Environment::get().getWorld()->getPlayerPtr()); diff --git a/apps/openmw/mwgui/journalviewmodel.cpp b/apps/openmw/mwgui/journalviewmodel.cpp index d05257e46..d78b18643 100644 --- a/apps/openmw/mwgui/journalviewmodel.cpp +++ b/apps/openmw/mwgui/journalviewmodel.cpp @@ -360,7 +360,7 @@ struct JournalViewModelImpl : JournalViewModel JournalViewModel::Ptr JournalViewModel::create () { - return boost::make_shared (); + return std::make_shared (); } } diff --git a/apps/openmw/mwgui/journalviewmodel.hpp b/apps/openmw/mwgui/journalviewmodel.hpp index b3c6b0183..b6bf4c511 100644 --- a/apps/openmw/mwgui/journalviewmodel.hpp +++ b/apps/openmw/mwgui/journalviewmodel.hpp @@ -6,7 +6,7 @@ #include #include #include -#include + namespace MWGui { @@ -18,7 +18,7 @@ namespace MWGui /// game data store. struct JournalViewModel { - typedef boost::shared_ptr Ptr; + typedef std::shared_ptr Ptr; typedef intptr_t QuestId; typedef intptr_t TopicId; diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 5d2a5318a..7bfa7c7ef 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -1,7 +1,7 @@ #ifndef MWGUI_JOURNAL_H #define MWGUI_JOURNAL_H -#include +#include namespace MWBase { class WindowManager; } @@ -12,7 +12,7 @@ namespace MWGui struct JournalWindow { /// construct a new instance of the one JournalWindow implementation - static JournalWindow * create (boost::shared_ptr Model); + static JournalWindow * create (std::shared_ptr Model); /// destroy this instance of the JournalWindow implementation virtual ~JournalWindow () {}; diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index 3e855c4d0..1f63ad13e 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -232,7 +232,7 @@ namespace MWGui osg::ref_ptr tex = mLocalMapRender->getFogOfWarTexture(x, y); if (tex) { - boost::shared_ptr myguitex (new osgMyGUI::OSGTexture(tex)); + std::shared_ptr myguitex (new osgMyGUI::OSGTexture(tex)); fog->setRenderItemTexture(myguitex.get()); fog->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f)); fogTextures.push_back(myguitex); @@ -371,7 +371,7 @@ namespace MWGui osg::ref_ptr texture = mLocalMapRender->getMapTexture(mapX, mapY); if (texture) { - boost::shared_ptr guiTex (new osgMyGUI::OSGTexture(texture)); + std::shared_ptr guiTex (new osgMyGUI::OSGTexture(texture)); textures.push_back(guiTex); box->setRenderItemTexture(guiTex.get()); box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f)); diff --git a/apps/openmw/mwgui/mapwindow.hpp b/apps/openmw/mwgui/mapwindow.hpp index 388103b5d..96b39d452 100644 --- a/apps/openmw/mwgui/mapwindow.hpp +++ b/apps/openmw/mwgui/mapwindow.hpp @@ -3,7 +3,7 @@ #include -#include + #include "windowpinnablebase.hpp" @@ -111,7 +111,7 @@ namespace MWGui std::vector mMapWidgets; std::vector mFogWidgets; - typedef std::vector > TextureVector; + typedef std::vector > TextureVector; TextureVector mMapTextures; TextureVector mFogTextures; diff --git a/apps/openmw/mwgui/screenfader.hpp b/apps/openmw/mwgui/screenfader.hpp index 402554555..6c2eb3b93 100644 --- a/apps/openmw/mwgui/screenfader.hpp +++ b/apps/openmw/mwgui/screenfader.hpp @@ -3,7 +3,7 @@ #include -#include + #include "windowbase.hpp" @@ -14,7 +14,7 @@ namespace MWGui class FadeOp { public: - typedef boost::shared_ptr Ptr; + typedef std::shared_ptr Ptr; FadeOp(ScreenFader * fader, float time, float targetAlpha); diff --git a/apps/openmw/mwmechanics/aicombat.cpp b/apps/openmw/mwmechanics/aicombat.cpp index 4eeea6f1f..377984f0b 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -90,7 +90,7 @@ namespace MWMechanics bool mCombatMove; osg::Vec3f mLastTargetPos; const MWWorld::CellStore* mCell; - boost::shared_ptr mCurrentAction; + std::shared_ptr mCurrentAction; float mActionCooldown; float mStrength; bool mForceNoShortcut; @@ -273,7 +273,7 @@ namespace MWMechanics float rangeAttack = 0; float rangeFollow = 0; - boost::shared_ptr& currentAction = storage.mCurrentAction; + std::shared_ptr& currentAction = storage.mCurrentAction; if (characterController.readyToPrepareAttack()) { currentAction = prepareNextAction(actor, target); diff --git a/apps/openmw/mwmechanics/aicombat.hpp b/apps/openmw/mwmechanics/aicombat.hpp index 083f23384..a9587cda1 100644 --- a/apps/openmw/mwmechanics/aicombat.hpp +++ b/apps/openmw/mwmechanics/aicombat.hpp @@ -12,7 +12,7 @@ #include "../mwbase/world.hpp" -#include + namespace ESM { diff --git a/apps/openmw/mwmechanics/aicombataction.cpp b/apps/openmw/mwmechanics/aicombataction.cpp index 33e3c3d67..d92fca36b 100644 --- a/apps/openmw/mwmechanics/aicombataction.cpp +++ b/apps/openmw/mwmechanics/aicombataction.cpp @@ -454,13 +454,13 @@ namespace MWMechanics // Already done in AiCombat itself } - boost::shared_ptr prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &target) + std::shared_ptr prepareNextAction(const MWWorld::Ptr &actor, const MWWorld::Ptr &target) { Spells& spells = actor.getClass().getCreatureStats(actor).getSpells(); float bestActionRating = 0.f; // Default to hand-to-hand combat - boost::shared_ptr bestAction (new ActionWeapon(MWWorld::Ptr())); + std::shared_ptr bestAction (new ActionWeapon(MWWorld::Ptr())); if (actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) { bestAction->prepare(actor); diff --git a/apps/openmw/mwmechanics/aicombataction.hpp b/apps/openmw/mwmechanics/aicombataction.hpp index a4a398d05..54e499297 100644 --- a/apps/openmw/mwmechanics/aicombataction.hpp +++ b/apps/openmw/mwmechanics/aicombataction.hpp @@ -1,13 +1,13 @@ #ifndef OPENMW_AICOMBAT_ACTION_H #define OPENMW_AICOMBAT_ACTION_H -#include +#include + +#include #include "../mwworld/ptr.hpp" #include "../mwworld/containerstore.hpp" -#include - namespace MWMechanics { @@ -84,7 +84,7 @@ namespace MWMechanics /// @note target may be empty float rateEffects (const ESM::EffectList& list, const MWWorld::Ptr& actor, const MWWorld::Ptr& target); - boost::shared_ptr prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& target); + std::shared_ptr prepareNextAction (const MWWorld::Ptr& actor, const MWWorld::Ptr& target); } #endif diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 91f459ff2..e2651bbf9 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -341,7 +341,7 @@ namespace MWRender if(!mResourceSystem->getVFS()->exists(kfname)) return; - boost::shared_ptr animsrc; + std::shared_ptr animsrc; animsrc.reset(new AnimSource); animsrc->mKeyframes = mResourceSystem->getSceneManager()->getKeyframes(kfname); @@ -391,7 +391,7 @@ namespace MWRender mStates.clear(); for(size_t i = 0;i < sNumGroups;i++) - mAnimationTimePtr[i]->setTimePtr(boost::shared_ptr()); + mAnimationTimePtr[i]->setTimePtr(std::shared_ptr()); mAccumCtrl = NULL; @@ -657,12 +657,12 @@ namespace MWRender active = state; } - mAnimationTimePtr[grp]->setTimePtr(active == mStates.end() ? boost::shared_ptr() : active->second.mTime); + mAnimationTimePtr[grp]->setTimePtr(active == mStates.end() ? std::shared_ptr() : active->second.mTime); // add external controllers for the AnimSource active in this group if (active != mStates.end()) { - boost::shared_ptr animsrc = active->second.mSource; + std::shared_ptr animsrc = active->second.mSource; for (AnimSource::ControllerMap::iterator it = animsrc->mControllerMap[grp].begin(); it != animsrc->mControllerMap[grp].end(); ++it) { @@ -1146,9 +1146,9 @@ namespace MWRender params.mEffectId = effectId; params.mBoneName = bonename; - params.mAnimTime = boost::shared_ptr(new EffectAnimationTime); + params.mAnimTime = std::shared_ptr(new EffectAnimationTime); - SceneUtil::AssignControllerSourcesVisitor assignVisitor(boost::shared_ptr(params.mAnimTime)); + SceneUtil::AssignControllerSourcesVisitor assignVisitor(std::shared_ptr(params.mAnimTime)); node->accept(assignVisitor); overrideTexture(texture, mResourceSystem, node); diff --git a/apps/openmw/mwrender/animation.hpp b/apps/openmw/mwrender/animation.hpp index d23a62954..1ae35fdaf 100644 --- a/apps/openmw/mwrender/animation.hpp +++ b/apps/openmw/mwrender/animation.hpp @@ -62,7 +62,7 @@ public: private: osg::ref_ptr mNode; }; -typedef boost::shared_ptr PartHolderPtr; +typedef std::shared_ptr PartHolderPtr; class Animation { @@ -95,13 +95,13 @@ protected: class AnimationTime : public SceneUtil::ControllerSource { private: - boost::shared_ptr mTimePtr; + std::shared_ptr mTimePtr; public: - void setTimePtr(boost::shared_ptr time) + void setTimePtr(std::shared_ptr time) { mTimePtr = time; } - boost::shared_ptr getTimePtr() const + std::shared_ptr getTimePtr() const { return mTimePtr; } virtual float getValue(osg::NodeVisitor* nv); @@ -119,13 +119,13 @@ protected: struct AnimSource; struct AnimState { - boost::shared_ptr mSource; + std::shared_ptr mSource; float mStartTime; float mLoopStartTime; float mLoopStopTime; float mStopTime; - typedef boost::shared_ptr TimePtr; + typedef std::shared_ptr TimePtr; TimePtr mTime; float mSpeedMult; @@ -155,7 +155,7 @@ protected: typedef std::map AnimStateMap; AnimStateMap mStates; - typedef std::vector > AnimSourceList; + typedef std::vector > AnimSourceList; AnimSourceList mAnimSources; osg::ref_ptr mInsert; @@ -176,7 +176,7 @@ protected: typedef std::multimap, osg::ref_ptr > ControllerMap; ControllerMap mActiveControllers; - boost::shared_ptr mAnimationTimePtr[sNumGroups]; + std::shared_ptr mAnimationTimePtr[sNumGroups]; // Stored in all lowercase for a case-insensitive lookup typedef std::map > NodeMap; @@ -192,7 +192,7 @@ protected: { std::string mModelName; // Just here so we don't add the same effect twice PartHolderPtr mObjects; - boost::shared_ptr mAnimTime; + std::shared_ptr mAnimTime; float mMaxControllerLength; int mEffectId; bool mLoop; diff --git a/apps/openmw/mwrender/creatureanimation.cpp b/apps/openmw/mwrender/creatureanimation.cpp index 35294b1b5..c583ce224 100644 --- a/apps/openmw/mwrender/creatureanimation.cpp +++ b/apps/openmw/mwrender/creatureanimation.cpp @@ -53,7 +53,7 @@ CreatureWeaponAnimation::CreatureWeaponAnimation(const MWWorld::Ptr &ptr, const updateParts(); } - mWeaponAnimationTime = boost::shared_ptr(new WeaponAnimationTime(this)); + mWeaponAnimationTime = std::shared_ptr(new WeaponAnimationTime(this)); } void CreatureWeaponAnimation::showWeapons(bool showWeapon) @@ -130,7 +130,7 @@ void CreatureWeaponAnimation::updatePart(PartHolderPtr& scene, int slot) else mAmmunition.reset(); - boost::shared_ptr source; + std::shared_ptr source; if (slot == MWWorld::InventoryStore::Slot_CarriedRight) source = mWeaponAnimationTime; diff --git a/apps/openmw/mwrender/creatureanimation.hpp b/apps/openmw/mwrender/creatureanimation.hpp index a62160253..1e3e7e0ff 100644 --- a/apps/openmw/mwrender/creatureanimation.hpp +++ b/apps/openmw/mwrender/creatureanimation.hpp @@ -61,7 +61,7 @@ namespace MWRender bool mShowWeapons; bool mShowCarriedLeft; - boost::shared_ptr mWeaponAnimationTime; + std::shared_ptr mWeaponAnimationTime; }; } diff --git a/apps/openmw/mwrender/effectmanager.hpp b/apps/openmw/mwrender/effectmanager.hpp index 6d7aaaf4f..d729dbc89 100644 --- a/apps/openmw/mwrender/effectmanager.hpp +++ b/apps/openmw/mwrender/effectmanager.hpp @@ -3,11 +3,10 @@ #include #include +#include #include -#include - namespace osg { class Group; @@ -44,7 +43,7 @@ namespace MWRender struct Effect { float mMaxControllerLength; - boost::shared_ptr mAnimTime; + std::shared_ptr mAnimTime; }; typedef std::map, Effect> EffectMap; diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 6252d392b..d70a190bd 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -282,8 +282,8 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, osg::ref_ptr par { mNpc = mPtr.get()->mBase; - mHeadAnimationTime = boost::shared_ptr(new HeadAnimationTime(mPtr)); - mWeaponAnimationTime = boost::shared_ptr(new WeaponAnimationTime(this)); + mHeadAnimationTime = std::shared_ptr(new HeadAnimationTime(mPtr)); + mWeaponAnimationTime = std::shared_ptr(new WeaponAnimationTime(this)); for(size_t i = 0;i < ESM::PRT_Count;i++) { @@ -756,7 +756,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g } } - boost::shared_ptr src; + std::shared_ptr src; if (type == ESM::PRT_Head) { src = mHeadAnimationTime; diff --git a/apps/openmw/mwrender/npcanimation.hpp b/apps/openmw/mwrender/npcanimation.hpp index 6462c53c3..947e274a5 100644 --- a/apps/openmw/mwrender/npcanimation.hpp +++ b/apps/openmw/mwrender/npcanimation.hpp @@ -62,8 +62,8 @@ private: osg::Vec3f mFirstPersonOffset; - boost::shared_ptr mHeadAnimationTime; - boost::shared_ptr mWeaponAnimationTime; + std::shared_ptr mHeadAnimationTime; + std::shared_ptr mWeaponAnimationTime; float mAlpha; bool mSoundsDisabled; diff --git a/apps/openmw/mwrender/ripplesimulation.cpp b/apps/openmw/mwrender/ripplesimulation.cpp index a3e96a5b1..38098b168 100644 --- a/apps/openmw/mwrender/ripplesimulation.cpp +++ b/apps/openmw/mwrender/ripplesimulation.cpp @@ -41,7 +41,7 @@ namespace } osg::ref_ptr controller (new NifOsg::FlipController(0, 0.3f/rippleFrameCount, textures)); - controller->setSource(boost::shared_ptr(new SceneUtil::FrameTimeSource)); + controller->setSource(std::shared_ptr(new SceneUtil::FrameTimeSource)); node->addUpdateCallback(controller); osg::ref_ptr stateset (new osg::StateSet); diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 49c00c33d..9a72e056a 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -996,7 +996,7 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather) } mParticleEffect = mSceneManager->createInstance(mCurrentParticleEffect, mParticleNode); - SceneUtil::AssignControllerSourcesVisitor assignVisitor(boost::shared_ptr(new SceneUtil::FrameTimeSource)); + SceneUtil::AssignControllerSourcesVisitor assignVisitor(std::shared_ptr(new SceneUtil::FrameTimeSource)); mParticleEffect->accept(assignVisitor); AlphaFader::SetupVisitor alphaFaderSetupVisitor; diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index 7cad745dd..ad02a18c6 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -95,7 +95,7 @@ namespace } osg::ref_ptr controller (new NifOsg::FlipController(0, 2/32.f, textures)); - controller->setSource(boost::shared_ptr(new SceneUtil::FrameTimeSource)); + controller->setSource(std::shared_ptr(new SceneUtil::FrameTimeSource)); node->addUpdateCallback(controller); node->setStateSet(stateset); stateset->setTextureAttributeAndModes(0, textures[0], osg::StateAttribute::ON); diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index df675aebb..d3a608e8b 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -502,7 +502,7 @@ namespace MWScript void InterpreterContext::executeActivation(MWWorld::Ptr ptr, MWWorld::Ptr actor) { - boost::shared_ptr action = (ptr.getClass().activate(ptr, actor)); + std::shared_ptr action = (ptr.getClass().activate(ptr, actor)); action->execute (actor); if (mActivated == ptr) { diff --git a/apps/openmw/mwscript/interpretercontext.hpp b/apps/openmw/mwscript/interpretercontext.hpp index d3841befd..7fa09b3a7 100644 --- a/apps/openmw/mwscript/interpretercontext.hpp +++ b/apps/openmw/mwscript/interpretercontext.hpp @@ -1,7 +1,7 @@ #ifndef GAME_SCRIPT_INTERPRETERCONTEXT_H #define GAME_SCRIPT_INTERPRETERCONTEXT_H -#include + #include diff --git a/apps/openmw/mwsound/movieaudiofactory.cpp b/apps/openmw/mwsound/movieaudiofactory.cpp index 47889051a..70e132fc3 100644 --- a/apps/openmw/mwsound/movieaudiofactory.cpp +++ b/apps/openmw/mwsound/movieaudiofactory.cpp @@ -90,7 +90,7 @@ namespace MWSound } MWBase::SoundPtr mAudioTrack; - boost::shared_ptr mDecoderBridge; + std::shared_ptr mDecoderBridge; }; @@ -155,9 +155,9 @@ namespace MWSound - boost::shared_ptr MovieAudioFactory::createDecoder(Video::VideoState* videoState) + std::shared_ptr MovieAudioFactory::createDecoder(Video::VideoState* videoState) { - boost::shared_ptr decoder(new MWSound::MovieAudioDecoder(videoState)); + std::shared_ptr decoder(new MWSound::MovieAudioDecoder(videoState)); decoder->setupFormat(); MWBase::SoundPtr sound = MWBase::Environment::get().getSoundManager()->playTrack(decoder->mDecoderBridge, MWBase::SoundManager::Play_TypeMovie); diff --git a/apps/openmw/mwsound/movieaudiofactory.hpp b/apps/openmw/mwsound/movieaudiofactory.hpp index 1391a0012..6ec49a4d3 100644 --- a/apps/openmw/mwsound/movieaudiofactory.hpp +++ b/apps/openmw/mwsound/movieaudiofactory.hpp @@ -8,7 +8,7 @@ namespace MWSound class MovieAudioFactory : public Video::MovieAudioFactory { - virtual boost::shared_ptr createDecoder(Video::VideoState* videoState); + virtual std::shared_ptr createDecoder(Video::VideoState* videoState); }; } diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index a984fffa9..89b1b1f78 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -856,7 +856,7 @@ void OpenAL_Output::bufferFinished(ALuint buf) MWBase::SoundPtr OpenAL_Output::playSound(const std::string &fname, float vol, float basevol, float pitch, int flags,float offset) { - boost::shared_ptr sound; + std::shared_ptr sound; ALuint src=0, buf=0; if(mFreeSources.empty()) @@ -895,7 +895,7 @@ MWBase::SoundPtr OpenAL_Output::playSound(const std::string &fname, float vol, f MWBase::SoundPtr OpenAL_Output::playSound3D(const std::string &fname, const osg::Vec3f &pos, float vol, float basevol, float pitch, float min, float max, int flags, float offset, bool extractLoudness) { - boost::shared_ptr sound; + std::shared_ptr sound; ALuint src=0, buf=0; if(mFreeSources.empty()) @@ -940,7 +940,7 @@ MWBase::SoundPtr OpenAL_Output::playSound3D(const std::string &fname, const osg: MWBase::SoundPtr OpenAL_Output::streamSound(DecoderPtr decoder, float volume, float pitch, int flags) { - boost::shared_ptr sound; + std::shared_ptr sound; ALuint src; if(mFreeSources.empty()) diff --git a/apps/openmw/mwsound/soundmanagerimp.hpp b/apps/openmw/mwsound/soundmanagerimp.hpp index f79bfce15..2ce60defc 100644 --- a/apps/openmw/mwsound/soundmanagerimp.hpp +++ b/apps/openmw/mwsound/soundmanagerimp.hpp @@ -5,7 +5,7 @@ #include #include -#include + #include @@ -43,7 +43,7 @@ namespace MWSound float mVoiceVolume; float mFootstepsVolume; - boost::shared_ptr mMusic; + std::shared_ptr mMusic; std::string mCurrentPlaylist; typedef std::pair PtrIDPair; diff --git a/apps/openmw/mwworld/cellstore.hpp b/apps/openmw/mwworld/cellstore.hpp index f879343d9..079dec1cd 100644 --- a/apps/openmw/mwworld/cellstore.hpp +++ b/apps/openmw/mwworld/cellstore.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include "livecellref.hpp" #include "cellreflist.hpp" @@ -44,7 +44,7 @@ namespace MWWorld // Even though fog actually belongs to the player and not cells, // it makes sense to store it here since we need it once for each cell. // Note this is NULL until the cell is explored to save some memory - boost::shared_ptr mFogState; + std::shared_ptr mFogState; const ESM::Cell *mCell; State mState; diff --git a/apps/openmw/mwworld/class.cpp b/apps/openmw/mwworld/class.cpp index 5ec2d4e16..bbd3190e7 100644 --- a/apps/openmw/mwworld/class.cpp +++ b/apps/openmw/mwworld/class.cpp @@ -25,7 +25,7 @@ namespace MWWorld { - std::map > Class::sClasses; + std::map > Class::sClasses; Class::Class() {} @@ -114,14 +114,14 @@ namespace MWWorld throw std::runtime_error("class does not have actor health"); } - boost::shared_ptr Class::activate (const Ptr& ptr, const Ptr& actor) const + std::shared_ptr Class::activate (const Ptr& ptr, const Ptr& actor) const { - return boost::shared_ptr (new NullAction); + return std::shared_ptr (new NullAction); } - boost::shared_ptr Class::use (const Ptr& ptr) const + std::shared_ptr Class::use (const Ptr& ptr) const { - return boost::shared_ptr (new NullAction); + return std::shared_ptr (new NullAction); } ContainerStore& Class::getContainerStore (const Ptr& ptr) const @@ -234,7 +234,7 @@ namespace MWWorld if (key.empty()) throw std::logic_error ("Class::get(): attempting to get an empty key"); - std::map >::const_iterator iter = sClasses.find (key); + std::map >::const_iterator iter = sClasses.find (key); if (iter==sClasses.end()) throw std::logic_error ("Class::get(): unknown class key: " + key); @@ -247,7 +247,7 @@ namespace MWWorld throw std::runtime_error ("class does not support persistence"); } - void Class::registerClass(const std::string& key, boost::shared_ptr instance) + void Class::registerClass(const std::string& key, std::shared_ptr instance) { instance->mTypeName = key; sClasses.insert(std::make_pair(key, instance)); @@ -311,23 +311,23 @@ namespace MWWorld { } - boost::shared_ptr Class::defaultItemActivate(const Ptr &ptr, const Ptr &actor) const + std::shared_ptr Class::defaultItemActivate(const Ptr &ptr, const Ptr &actor) const { if(!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory)) - return boost::shared_ptr(new NullAction()); + return std::shared_ptr(new NullAction()); if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) { const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const ESM::Sound *sound = store.get().searchRandom("WolfItem"); - boost::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); + std::shared_ptr action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); if(sound) action->setSound(sound->mId); return action; } - boost::shared_ptr action(new ActionTake(ptr)); + std::shared_ptr action(new ActionTake(ptr)); action->setSound(getUpSoundId(ptr)); return action; diff --git a/apps/openmw/mwworld/class.hpp b/apps/openmw/mwworld/class.hpp index 7ef173555..eecd1ed19 100644 --- a/apps/openmw/mwworld/class.hpp +++ b/apps/openmw/mwworld/class.hpp @@ -4,8 +4,7 @@ #include #include #include - -#include +#include #include "ptr.hpp" @@ -51,7 +50,7 @@ namespace MWWorld /// \brief Base class for referenceable esm records class Class { - static std::map > sClasses; + static std::map > sClasses; std::string mTypeName; @@ -63,7 +62,7 @@ namespace MWWorld Class(); - boost::shared_ptr defaultItemActivate(const Ptr &ptr, const Ptr &actor) const; + std::shared_ptr defaultItemActivate(const Ptr &ptr, const Ptr &actor) const; ///< Generate default action for activating inventory items virtual Ptr copyToCellImpl(const Ptr &ptr, CellStore &cell) const; @@ -142,10 +141,10 @@ namespace MWWorld /// correct dialog and actor states are properly handled when being hurt or healed. /// (default implementation: throw an exception) - virtual boost::shared_ptr activate (const Ptr& ptr, const Ptr& actor) const; + virtual std::shared_ptr activate (const Ptr& ptr, const Ptr& actor) const; ///< Generate action for activation (default implementation: return a null action). - virtual boost::shared_ptr use (const Ptr& ptr) + virtual std::shared_ptr use (const Ptr& ptr) const; ///< Generate action for using via inventory menu (default implementation: return a /// null action). @@ -321,7 +320,7 @@ namespace MWWorld static const Class& get (const std::string& key); ///< If there is no class for this \a key, an exception is thrown. - static void registerClass (const std::string& key, boost::shared_ptr instance); + static void registerClass (const std::string& key, std::shared_ptr instance); virtual int getBaseGold(const MWWorld::Ptr& ptr) const; diff --git a/apps/openmw/mwworld/projectilemanager.hpp b/apps/openmw/mwworld/projectilemanager.hpp index 0aa2efded..36c57367d 100644 --- a/apps/openmw/mwworld/projectilemanager.hpp +++ b/apps/openmw/mwworld/projectilemanager.hpp @@ -71,7 +71,7 @@ namespace MWWorld struct State { osg::ref_ptr mNode; - boost::shared_ptr mEffectAnimationTime; + std::shared_ptr mEffectAnimationTime; int mActorId; diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 7964edf45..d504c4072 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -1,7 +1,7 @@ #ifndef GAME_MWWORLD_WORLDIMP_H #define GAME_MWWORLD_WORLDIMP_H -#include + #include @@ -84,7 +84,7 @@ namespace MWWorld std::string mCurrentWorldSpace; - boost::shared_ptr mProjectileManager; + std::shared_ptr mProjectileManager; bool mGodMode; bool mScriptsEnabled; diff --git a/components/files/constrainedfilestream.hpp b/components/files/constrainedfilestream.hpp index 069ceec58..2f4798bb7 100644 --- a/components/files/constrainedfilestream.hpp +++ b/components/files/constrainedfilestream.hpp @@ -2,8 +2,8 @@ #define OPENMW_CONSTRAINEDFILESTREAM_H #include +#include -#include namespace Files { @@ -17,7 +17,7 @@ public: virtual ~ConstrainedFileStream(); }; -typedef boost::shared_ptr IStreamPtr; +typedef std::shared_ptr IStreamPtr; IStreamPtr openConstrainedFileStream(const char *filename, size_t start=0, size_t length=0xFFFFFFFF); diff --git a/components/nif/niffile.hpp b/components/nif/niffile.hpp index 6fbef31ca..61b164778 100644 --- a/components/nif/niffile.hpp +++ b/components/nif/niffile.hpp @@ -94,7 +94,7 @@ public: /// Get the name of the file std::string getFilename(){ return filename; } }; -typedef boost::shared_ptr NIFFilePtr; +typedef std::shared_ptr NIFFilePtr; diff --git a/components/nif/nifkey.hpp b/components/nif/nifkey.hpp index d702d0292..e816158fc 100644 --- a/components/nif/nifkey.hpp +++ b/components/nif/nifkey.hpp @@ -5,11 +5,11 @@ #include "nifstream.hpp" +#include + #include #include -#include - #include "niffile.hpp" namespace Nif @@ -148,10 +148,10 @@ typedef KeyMapT Vector3KeyMap; typedef KeyMapT Vector4KeyMap; typedef KeyMapT QuaternionKeyMap; -typedef boost::shared_ptr FloatKeyMapPtr; -typedef boost::shared_ptr Vector3KeyMapPtr; -typedef boost::shared_ptr Vector4KeyMapPtr; -typedef boost::shared_ptr QuaternionKeyMapPtr; +typedef std::shared_ptr FloatKeyMapPtr; +typedef std::shared_ptr Vector3KeyMapPtr; +typedef std::shared_ptr Vector4KeyMapPtr; +typedef std::shared_ptr QuaternionKeyMapPtr; } // Namespace #endif //#ifndef OPENMW_COMPONENTS_NIF_NIFKEY_HPP diff --git a/components/nif/recordptr.hpp b/components/nif/recordptr.hpp index 25beaf098..d323d08f2 100644 --- a/components/nif/recordptr.hpp +++ b/components/nif/recordptr.hpp @@ -1,9 +1,12 @@ #ifndef OPENMW_COMPONENTS_NIF_RECORDPTR_HPP #define OPENMW_COMPONENTS_NIF_RECORDPTR_HPP +#include + +#include + #include "niffile.hpp" #include "nifstream.hpp" -#include namespace Nif { diff --git a/components/nifosg/controller.hpp b/components/nifosg/controller.hpp index 4877c83db..32bab76c9 100644 --- a/components/nifosg/controller.hpp +++ b/components/nifosg/controller.hpp @@ -9,7 +9,7 @@ #include #include -#include + #include //UVController diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index b5439afee..b2b3828a7 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -325,7 +325,7 @@ namespace NifOsg continue; osg::ref_ptr callback(new NifOsg::KeyframeController(key->data.getPtr())); - callback->setFunction(boost::shared_ptr(new NifOsg::ControllerFunction(key))); + callback->setFunction(std::shared_ptr(new NifOsg::ControllerFunction(key))); target.mKeyframeControllers[strdata->string] = callback; } @@ -371,9 +371,9 @@ namespace NifOsg { bool autoPlay = animflags & Nif::NiNode::AnimFlag_AutoPlay; if (autoPlay) - toSetup->setSource(boost::shared_ptr(new SceneUtil::FrameTimeSource)); + toSetup->setSource(std::shared_ptr(new SceneUtil::FrameTimeSource)); - toSetup->setFunction(boost::shared_ptr(new ControllerFunction(ctrl))); + toSetup->setFunction(std::shared_ptr(new ControllerFunction(ctrl))); } void optimize (const Nif::Node* nifNode, osg::Group* node, bool skipMeshes) diff --git a/components/resource/texturemanager.cpp b/components/resource/texturemanager.cpp index 62cbd6bb3..05715503c 100644 --- a/components/resource/texturemanager.cpp +++ b/components/resource/texturemanager.cpp @@ -2,6 +2,8 @@ #include +#include + #include #include diff --git a/components/sceneutil/controller.cpp b/components/sceneutil/controller.cpp index a2c1cdcd3..079f42329 100644 --- a/components/sceneutil/controller.cpp +++ b/components/sceneutil/controller.cpp @@ -28,22 +28,22 @@ namespace SceneUtil return mSource->getValue(nv); } - void Controller::setSource(boost::shared_ptr source) + void Controller::setSource(std::shared_ptr source) { mSource = source; } - void Controller::setFunction(boost::shared_ptr function) + void Controller::setFunction(std::shared_ptr function) { mFunction = function; } - boost::shared_ptr Controller::getSource() const + std::shared_ptr Controller::getSource() const { return mSource; } - boost::shared_ptr Controller::getFunction() const + std::shared_ptr Controller::getFunction() const { return mFunction; } @@ -114,7 +114,7 @@ namespace SceneUtil { } - AssignControllerSourcesVisitor::AssignControllerSourcesVisitor(boost::shared_ptr toAssign) + AssignControllerSourcesVisitor::AssignControllerSourcesVisitor(std::shared_ptr toAssign) : ControllerVisitor() , mToAssign(toAssign) { diff --git a/components/sceneutil/controller.hpp b/components/sceneutil/controller.hpp index 7399ecad5..b2409fdba 100644 --- a/components/sceneutil/controller.hpp +++ b/components/sceneutil/controller.hpp @@ -1,7 +1,7 @@ #ifndef OPENMW_COMPONENTS_SCENEUTIL_CONTROLLER_H #define OPENMW_COMPONENTS_SCENEUTIL_CONTROLLER_H -#include +#include #include @@ -43,17 +43,17 @@ namespace SceneUtil float getInputValue(osg::NodeVisitor* nv); - void setSource(boost::shared_ptr source); - void setFunction(boost::shared_ptr function); + void setSource(std::shared_ptr source); + void setFunction(std::shared_ptr function); - boost::shared_ptr getSource() const; - boost::shared_ptr getFunction() const; + std::shared_ptr getSource() const; + std::shared_ptr getFunction() const; private: - boost::shared_ptr mSource; + std::shared_ptr mSource; // The source value gets passed through this function before it's passed on to the DestValue. - boost::shared_ptr mFunction; + std::shared_ptr mFunction; }; /// Pure virtual base class - visit() all controllers that are attached as UpdateCallbacks in a scene graph. @@ -72,14 +72,14 @@ namespace SceneUtil { public: AssignControllerSourcesVisitor(); - AssignControllerSourcesVisitor(boost::shared_ptr toAssign); + AssignControllerSourcesVisitor(std::shared_ptr toAssign); /// Assign the wanted ControllerSource. May be overridden in derived classes. /// By default assigns the ControllerSource passed to the constructor of this class if no ControllerSource is assigned to that controller yet. virtual void visit(osg::Node& node, Controller& ctrl); private: - boost::shared_ptr mToAssign; + std::shared_ptr mToAssign; }; /// Finds the maximum of all controller functions in the given scene graph diff --git a/components/vfs/manager.cpp b/components/vfs/manager.cpp index 6be6dca9e..af1e15500 100644 --- a/components/vfs/manager.cpp +++ b/components/vfs/manager.cpp @@ -2,6 +2,7 @@ #include #include +#include #include "archive.hpp" diff --git a/extern/osg-ffmpeg-videoplayer/audiofactory.hpp b/extern/osg-ffmpeg-videoplayer/audiofactory.hpp index 06abd6a74..3cbfe79b0 100644 --- a/extern/osg-ffmpeg-videoplayer/audiofactory.hpp +++ b/extern/osg-ffmpeg-videoplayer/audiofactory.hpp @@ -3,7 +3,7 @@ #include "audiodecoder.hpp" -#include + namespace Video { @@ -11,7 +11,7 @@ namespace Video class MovieAudioFactory { public: - virtual boost::shared_ptr createDecoder(VideoState* videoState) = 0; + virtual std::shared_ptr createDecoder(VideoState* videoState) = 0; virtual ~MovieAudioFactory() {} }; diff --git a/extern/osg-ffmpeg-videoplayer/videoplayer.cpp b/extern/osg-ffmpeg-videoplayer/videoplayer.cpp index 9ec815130..c6544de9c 100644 --- a/extern/osg-ffmpeg-videoplayer/videoplayer.cpp +++ b/extern/osg-ffmpeg-videoplayer/videoplayer.cpp @@ -27,7 +27,7 @@ void VideoPlayer::setAudioFactory(MovieAudioFactory *factory) mAudioFactory.reset(factory); } -void VideoPlayer::playVideo(boost::shared_ptr inputstream, const std::string& name) +void VideoPlayer::playVideo(std::shared_ptr inputstream, const std::string& name) { if(mState) close(); diff --git a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp index c118ddb7f..6324c7c6f 100644 --- a/extern/osg-ffmpeg-videoplayer/videoplayer.hpp +++ b/extern/osg-ffmpeg-videoplayer/videoplayer.hpp @@ -10,7 +10,7 @@ #include -#include + namespace osg { @@ -44,7 +44,7 @@ namespace Video /// Play the given video. If a video is already playing, the old video is closed first. /// @note The video will be unpaused by default. Use the pause() and play() methods to control pausing. /// @param name A name for the video stream - only used for logging purposes. - void playVideo (boost::shared_ptr inputstream, const std::string& name); + void playVideo (std::shared_ptr inputstream, const std::string& name); /// Get the current playback time position in the video, in seconds double getCurrentTime(); diff --git a/extern/osg-ffmpeg-videoplayer/videostate.cpp b/extern/osg-ffmpeg-videoplayer/videostate.cpp index f143088e8..4e90deb0f 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.cpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.cpp @@ -601,7 +601,7 @@ int VideoState::stream_open(int stream_index, AVFormatContext *pFormatCtx) return 0; } -void VideoState::init(boost::shared_ptr inputstream, const std::string &name) +void VideoState::init(std::shared_ptr inputstream, const std::string &name) { int video_index = -1; int audio_index = -1; diff --git a/extern/osg-ffmpeg-videoplayer/videostate.hpp b/extern/osg-ffmpeg-videoplayer/videostate.hpp index 72a2aab18..f9a46910e 100644 --- a/extern/osg-ffmpeg-videoplayer/videostate.hpp +++ b/extern/osg-ffmpeg-videoplayer/videostate.hpp @@ -86,7 +86,7 @@ struct VideoState { void setAudioFactory(MovieAudioFactory* factory); - void init(boost::shared_ptr inputstream, const std::string& name); + void init(std::shared_ptr inputstream, const std::string& name); void deinit(); void setPaused(bool isPaused); @@ -119,11 +119,11 @@ struct VideoState { osg::ref_ptr mTexture; MovieAudioFactory* mAudioFactory; - boost::shared_ptr mAudioDecoder; + std::shared_ptr mAudioDecoder; ExternalClock mExternalClock; - boost::shared_ptr stream; + std::shared_ptr stream; AVFormatContext* format_ctx; int av_sync_type;