diff --git a/.travis.yml b/.travis.yml index 4dbc7687b7..86dbdcfd4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: # Tests libgtest-dev, google-mock, # Boost - libboost-filesystem-dev, libboost-program-options-dev, libboost-system-dev, libboost-thread-dev, + libboost-filesystem-dev, libboost-program-options-dev, libboost-system-dev, # FFmpeg libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, # Audio & Video diff --git a/apps/bsatool/bsatool.cpp b/apps/bsatool/bsatool.cpp index 7f305052b1..54e946cbcf 100644 --- a/apps/bsatool/bsatool.cpp +++ b/apps/bsatool/bsatool.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index c27e15a3e5..2c05f9ecb6 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -1,8 +1,8 @@ #include "importer.hpp" #include +#include -#include #include #include @@ -272,37 +272,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?) @@ -312,7 +312,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); @@ -323,7 +323,7 @@ namespace ESSImport ESM::NAME n = esm.getRecName(); esm.getRecHeader(); - std::map >::iterator it = converters.find(n.intval); + std::map >::iterator it = converters.find(n.intval); if (it != converters.end()) { it->second->read(esm); @@ -386,7 +386,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) @@ -399,7 +399,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 8a9c49a09e..030a0174e7 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -3,7 +3,6 @@ #include -#include #include #include diff --git a/apps/opencs/model/filter/andnode.cpp b/apps/opencs/model/filter/andnode.cpp index 9086627991..7578657178 100644 --- a/apps/opencs/model/filter/andnode.cpp +++ b/apps/opencs/model/filter/andnode.cpp @@ -2,7 +2,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 3838b451d4..56d1d79484 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 f2e0e5cb2c..2fa9ac6ccb 100644 --- a/apps/opencs/model/filter/narynode.cpp +++ b/apps/opencs/model/filter/narynode.cpp @@ -2,7 +2,7 @@ #include -CSMFilter::NAryNode::NAryNode (const std::vector >& nodes, +CSMFilter::NAryNode::NAryNode (const std::vector >& nodes, const std::string& name) : mNodes (nodes), mName (name) {} @@ -21,7 +21,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 aa501d0095..1cd93e62ea 100644 --- a/apps/opencs/model/filter/narynode.hpp +++ b/apps/opencs/model/filter/narynode.hpp @@ -4,20 +4,18 @@ #include #include -#include - #include "node.hpp" 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 58588bdc52..7295b9018a 100644 --- a/apps/opencs/model/filter/node.hpp +++ b/apps/opencs/model/filter/node.hpp @@ -3,10 +3,9 @@ #include #include +#include #include -#include - #include namespace CSMWorld @@ -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 ba5302bbee..81588c7547 100644 --- a/apps/opencs/model/filter/notnode.cpp +++ b/apps/opencs/model/filter/notnode.cpp @@ -1,6 +1,6 @@ #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 0281d99dac..e3c57cede4 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 41ec7b5cf3..9e6d8b2c46 100644 --- a/apps/opencs/model/filter/ornode.cpp +++ b/apps/opencs/model/filter/ornode.cpp @@ -2,7 +2,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 07ab51a6a9..b89da4e753 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 c0c089169d..d2bedc666e 100644 --- a/apps/opencs/model/filter/parser.cpp +++ b/apps/opencs/model/filter/parser.cpp @@ -235,7 +235,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()) { @@ -247,11 +247,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: @@ -260,12 +260,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: @@ -281,7 +281,7 @@ boost::shared_ptr CSMFilter::Parser::parseImp (bool allowEmpty, if (!allowEmpty) error(); - return boost::shared_ptr(); + return std::shared_ptr(); default: @@ -289,27 +289,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); @@ -318,7 +318,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) @@ -328,31 +328,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; @@ -370,7 +370,7 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (columnId<0) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -378,7 +378,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 @@ -387,7 +387,7 @@ boost::shared_ptr CSMFilter::Parser::parseText() if (!token.isString()) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } std::string text = token.mString; @@ -397,26 +397,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; @@ -434,7 +434,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (columnId<0) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -442,7 +442,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() if (token.mType!=Token::Type_Comma) { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } // parse value @@ -467,7 +467,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(); @@ -481,7 +481,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) @@ -491,7 +491,7 @@ boost::shared_ptr CSMFilter::Parser::parseValue() else { error(); - return boost::shared_ptr(); + return std::shared_ptr(); } token = getNextToken(); @@ -513,7 +513,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(); } } @@ -522,10 +522,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() @@ -556,7 +556,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; @@ -612,7 +612,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 5700102cf1..344c552eff 100644 --- a/apps/opencs/model/filter/parser.hpp +++ b/apps/opencs/model/filter/parser.hpp @@ -1,8 +1,6 @@ #ifndef CSM_FILTER_PARSER_H #define CSM_FILTER_PARSER_H -#include - #include "node.hpp" namespace CSMWorld @@ -16,7 +14,7 @@ namespace CSMFilter class Parser { - boost::shared_ptr mFilter; + std::shared_ptr mFilter; std::string mInput; int mIndex; bool mError; @@ -31,14 +29,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 +49,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 cbdadf6fc1..7211f78b0a 100644 --- a/apps/opencs/model/filter/unarynode.cpp +++ b/apps/opencs/model/filter/unarynode.cpp @@ -1,6 +1,6 @@ #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 6bbc960920..cbee4e0bae 100644 --- a/apps/opencs/model/filter/unarynode.hpp +++ b/apps/opencs/model/filter/unarynode.hpp @@ -1,20 +1,18 @@ #ifndef CSM_FILTER_UNARYNODE_H #define CSM_FILTER_UNARYNODE_H -#include - #include "node.hpp" 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 5a59f19f72..8b7faf2ed3 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -554,12 +554,12 @@ CSMWorld::Data::~Data() delete mReader; } -boost::shared_ptr CSMWorld::Data::getResourceSystem() +std::shared_ptr CSMWorld::Data::getResourceSystem() { return mResourceSystem; } -boost::shared_ptr CSMWorld::Data::getResourceSystem() const +std::shared_ptr CSMWorld::Data::getResourceSystem() const { return mResourceSystem; } @@ -891,7 +891,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; @@ -945,7 +945,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 dc00a33d2e..f96003e443 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -119,9 +119,9 @@ namespace CSMWorld std::map > mRefLoadCache; int mReaderIndex; - boost::shared_ptr mResourceSystem; + std::shared_ptr mResourceSystem; - std::vector > mReaders; + std::vector > mReaders; std::map mContentFileNames; @@ -148,9 +148,9 @@ namespace CSMWorld const Fallback::Map* getFallbackMap() const; - boost::shared_ptr getResourceSystem(); + std::shared_ptr getResourceSystem(); - boost::shared_ptr getResourceSystem() const; + std::shared_ptr getResourceSystem() const; const IdCollection& getGlobals() const; diff --git a/apps/opencs/model/world/idcompletionmanager.cpp b/apps/opencs/model/world/idcompletionmanager.cpp index 7f3221342b..a6de2c8f5d 100644 --- a/apps/opencs/model/world/idcompletionmanager.cpp +++ b/apps/opencs/model/world/idcompletionmanager.cpp @@ -77,7 +77,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)) { @@ -99,7 +99,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 7944e6777e..e48360432a 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 fbf7b6cf36..6d50e9edb0 100644 --- a/apps/opencs/model/world/idtableproxymodel.cpp +++ b/apps/opencs/model/world/idtableproxymodel.cpp @@ -82,7 +82,7 @@ void CSMWorld::IdTableProxyModel::setSourceModel(QAbstractItemModel *model) SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &))); } -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 cf31b5c11b..dd7ab41eb4 100644 --- a/apps/opencs/model/world/idtableproxymodel.hpp +++ b/apps/opencs/model/world/idtableproxymodel.hpp @@ -3,8 +3,6 @@ #include -#include - #include #include @@ -19,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) // Cache of enum values for enum columns (e.g. Modified, Record Type). @@ -43,7 +41,7 @@ namespace CSMWorld virtual void setSourceModel(QAbstractItemModel *model); - void setFilter (const boost::shared_ptr& filter); + void setFilter (const std::shared_ptr& filter); void refreshFilter(); diff --git a/apps/opencs/view/filter/editwidget.hpp b/apps/opencs/view/filter/editwidget.hpp index f672877d94..51a36969a6 100644 --- a/apps/opencs/view/filter/editwidget.hpp +++ b/apps/opencs/view/filter/editwidget.hpp @@ -1,8 +1,6 @@ #ifndef CSV_FILTER_EDITWIDGET_H #define CSV_FILTER_EDITWIDGET_H -#include - #include #include #include @@ -38,7 +36,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 4c252e7d9c..461b131dbf 100644 --- a/apps/opencs/view/filter/filterbox.cpp +++ b/apps/opencs/view/filter/filterbox.cpp @@ -21,8 +21,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 c765164e76..e794a9880f 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 2bf589215e..d244658971 100644 --- a/apps/opencs/view/filter/recordfilterbox.cpp +++ b/apps/opencs/view/filter/recordfilterbox.cpp @@ -23,8 +23,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 29d12529a4..77a07c92bc 100644 --- a/apps/opencs/view/filter/recordfilterbox.hpp +++ b/apps/opencs/view/filter/recordfilterbox.hpp @@ -1,8 +1,6 @@ #ifndef CSV_FILTER_RECORDFILTERBOX_H #define CSV_FILTER_RECORDFILTERBOX_H -#include - #include #include @@ -38,7 +36,7 @@ namespace CSVFilter signals: - void filterChanged (boost::shared_ptr filter); + void filterChanged (std::shared_ptr filter); }; } diff --git a/apps/opencs/view/render/object.hpp b/apps/opencs/view/render/object.hpp index d3cba6c559..e28e2562cb 100644 --- a/apps/opencs/view/render/object.hpp +++ b/apps/opencs/view/render/object.hpp @@ -3,8 +3,6 @@ #include -#include - #include #include diff --git a/apps/opencs/view/render/scenewidget.cpp b/apps/opencs/view/render/scenewidget.cpp index a072cd0aad..82eebf1278 100644 --- a/apps/opencs/view/render/scenewidget.cpp +++ b/apps/opencs/view/render/scenewidget.cpp @@ -172,7 +172,7 @@ void CompositeViewer::update() // --------------------------------------------------- -SceneWidget::SceneWidget(boost::shared_ptr resourceSystem, QWidget *parent, Qt::WindowFlags f, +SceneWidget::SceneWidget(std::shared_ptr resourceSystem, QWidget *parent, Qt::WindowFlags f, bool retrieveInput) : RenderWidget(parent, f) , mResourceSystem(resourceSystem) diff --git a/apps/opencs/view/render/scenewidget.hpp b/apps/opencs/view/render/scenewidget.hpp index c5d9cdfce4..cc3191c818 100644 --- a/apps/opencs/view/render/scenewidget.hpp +++ b/apps/opencs/view/render/scenewidget.hpp @@ -10,8 +10,6 @@ #include #include -#include - #include "lightingday.hpp" #include "lightingnight.hpp" #include "lightingbright.hpp" @@ -78,7 +76,7 @@ namespace CSVRender { Q_OBJECT public: - SceneWidget(boost::shared_ptr resourceSystem, QWidget* parent = 0, + SceneWidget(std::shared_ptr resourceSystem, QWidget* parent = 0, Qt::WindowFlags f = 0, bool retrieveInput = true); virtual ~SceneWidget(); @@ -98,7 +96,7 @@ namespace CSVRender virtual void mouseMoveEvent (QMouseEvent *event); virtual void wheelEvent (QWheelEvent *event); - boost::shared_ptr mResourceSystem; + std::shared_ptr mResourceSystem; Lighting* mLighting; diff --git a/apps/opencs/view/render/worldspacewidget.hpp b/apps/opencs/view/render/worldspacewidget.hpp index b30d7de8ae..08b97e1bef 100644 --- a/apps/opencs/view/render/worldspacewidget.hpp +++ b/apps/opencs/view/render/worldspacewidget.hpp @@ -1,8 +1,6 @@ #ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H #define OPENCS_VIEW_WORLDSPACEWIDGET_H -#include - #include #include diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 07db5b4776..30dba42419 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -692,7 +692,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 768ff185d5..26f6e78995 100644 --- a/apps/opencs/view/world/table.hpp +++ b/apps/opencs/view/world/table.hpp @@ -151,7 +151,7 @@ namespace CSVWorld void requestFocus (const std::string& id); - void recordFilterChanged (boost::shared_ptr filter); + void recordFilterChanged (std::shared_ptr filter); void rowAdded(const std::string &id); }; diff --git a/apps/opencs/view/world/tablesubview.cpp b/apps/opencs/view/world/tablesubview.cpp index fcf66ed810..6664a37713 100644 --- a/apps/opencs/view/world/tablesubview.cpp +++ b/apps/opencs/view/world/tablesubview.cpp @@ -78,8 +78,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/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index ac0337af5b..02882adbe6 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -28,11 +28,9 @@ #include #include -#include #include -#include #include diff --git a/components/contentselector/view/contentselector.cpp b/components/contentselector/view/contentselector.cpp index b98bb667d6..f4da7e6ade 100644 --- a/components/contentselector/view/contentselector.cpp +++ b/components/contentselector/view/contentselector.cpp @@ -6,9 +6,11 @@ #include #include + #include +#include +#include #include -#include ContentSelectorView::ContentSelector::ContentSelector(QWidget *parent) : QObject(parent) diff --git a/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp b/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp index 096a17a648..09de3bc447 100644 --- a/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp +++ b/extern/osg-ffmpeg-videoplayer/audiodecoder.cpp @@ -1,6 +1,7 @@ #include "audiodecoder.hpp" #include +#include extern "C" {