purge the rest of boost::shared and any other boost related things that no longer are required

put boost system back in, clean others up

revert Qt

add back boost fstream
This commit is contained in:
Bret Curtis 2017-05-05 21:42:57 +02:00
parent d785344fad
commit 39185e6f8c
38 changed files with 131 additions and 152 deletions

View file

@ -32,7 +32,7 @@ addons:
# Tests # Tests
libgtest-dev, google-mock, libgtest-dev, google-mock,
# Boost # 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 # FFmpeg
libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev,
# Audio & Video # Audio & Video

View file

@ -1,7 +1,6 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <exception>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>

View file

@ -1,8 +1,8 @@
#include "importer.hpp" #include "importer.hpp"
#include <iomanip> #include <iomanip>
#include <utility>
#include <boost/shared_ptr.hpp>
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osg/ImageUtils> #include <osg/ImageUtils>
@ -272,37 +272,37 @@ namespace ESSImport
const unsigned int recGAME = ESM::FourCC<'G','A','M','E'>::value; const unsigned int recGAME = ESM::FourCC<'G','A','M','E'>::value;
const unsigned int recJOUR = ESM::FourCC<'J','O','U','R'>::value; const unsigned int recJOUR = ESM::FourCC<'J','O','U','R'>::value;
std::map<unsigned int, boost::shared_ptr<Converter> > converters; std::map<unsigned int, std::shared_ptr<Converter> > converters;
converters[ESM::REC_GLOB] = boost::shared_ptr<Converter>(new ConvertGlobal()); converters[ESM::REC_GLOB] = std::shared_ptr<Converter>(new ConvertGlobal());
converters[ESM::REC_BOOK] = boost::shared_ptr<Converter>(new ConvertBook()); converters[ESM::REC_BOOK] = std::shared_ptr<Converter>(new ConvertBook());
converters[ESM::REC_NPC_] = boost::shared_ptr<Converter>(new ConvertNPC()); converters[ESM::REC_NPC_] = std::shared_ptr<Converter>(new ConvertNPC());
converters[ESM::REC_CREA] = boost::shared_ptr<Converter>(new ConvertCREA()); converters[ESM::REC_CREA] = std::shared_ptr<Converter>(new ConvertCREA());
converters[ESM::REC_NPCC] = boost::shared_ptr<Converter>(new ConvertNPCC()); converters[ESM::REC_NPCC] = std::shared_ptr<Converter>(new ConvertNPCC());
converters[ESM::REC_CREC] = boost::shared_ptr<Converter>(new ConvertCREC()); converters[ESM::REC_CREC] = std::shared_ptr<Converter>(new ConvertCREC());
converters[recREFR ] = boost::shared_ptr<Converter>(new ConvertREFR()); converters[recREFR ] = std::shared_ptr<Converter>(new ConvertREFR());
converters[recPCDT ] = boost::shared_ptr<Converter>(new ConvertPCDT()); converters[recPCDT ] = std::shared_ptr<Converter>(new ConvertPCDT());
converters[recFMAP ] = boost::shared_ptr<Converter>(new ConvertFMAP()); converters[recFMAP ] = std::shared_ptr<Converter>(new ConvertFMAP());
converters[recKLST ] = boost::shared_ptr<Converter>(new ConvertKLST()); converters[recKLST ] = std::shared_ptr<Converter>(new ConvertKLST());
converters[recSTLN ] = boost::shared_ptr<Converter>(new ConvertSTLN()); converters[recSTLN ] = std::shared_ptr<Converter>(new ConvertSTLN());
converters[recGAME ] = boost::shared_ptr<Converter>(new ConvertGAME()); converters[recGAME ] = std::shared_ptr<Converter>(new ConvertGAME());
converters[ESM::REC_CELL] = boost::shared_ptr<Converter>(new ConvertCell()); converters[ESM::REC_CELL] = std::shared_ptr<Converter>(new ConvertCell());
converters[ESM::REC_ALCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>()); converters[ESM::REC_ALCH] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Potion>());
converters[ESM::REC_CLAS] = boost::shared_ptr<Converter>(new ConvertClass()); converters[ESM::REC_CLAS] = std::shared_ptr<Converter>(new ConvertClass());
converters[ESM::REC_SPEL] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Spell>()); converters[ESM::REC_SPEL] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Spell>());
converters[ESM::REC_ARMO] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Armor>()); converters[ESM::REC_ARMO] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Armor>());
converters[ESM::REC_WEAP] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>()); converters[ESM::REC_WEAP] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
converters[ESM::REC_CLOT] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Clothing>()); converters[ESM::REC_CLOT] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Clothing>());
converters[ESM::REC_ENCH] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Enchantment>()); converters[ESM::REC_ENCH] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Enchantment>());
converters[ESM::REC_WEAP] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>()); converters[ESM::REC_WEAP] = std::shared_ptr<Converter>(new DefaultConverter<ESM::Weapon>());
converters[ESM::REC_LEVC] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::CreatureLevList>()); converters[ESM::REC_LEVC] = std::shared_ptr<Converter>(new DefaultConverter<ESM::CreatureLevList>());
converters[ESM::REC_LEVI] = boost::shared_ptr<Converter>(new DefaultConverter<ESM::ItemLevList>()); converters[ESM::REC_LEVI] = std::shared_ptr<Converter>(new DefaultConverter<ESM::ItemLevList>());
converters[ESM::REC_CNTC] = boost::shared_ptr<Converter>(new ConvertCNTC()); converters[ESM::REC_CNTC] = std::shared_ptr<Converter>(new ConvertCNTC());
converters[ESM::REC_FACT] = boost::shared_ptr<Converter>(new ConvertFACT()); converters[ESM::REC_FACT] = std::shared_ptr<Converter>(new ConvertFACT());
converters[ESM::REC_INFO] = boost::shared_ptr<Converter>(new ConvertINFO()); converters[ESM::REC_INFO] = std::shared_ptr<Converter>(new ConvertINFO());
converters[ESM::REC_DIAL] = boost::shared_ptr<Converter>(new ConvertDIAL()); converters[ESM::REC_DIAL] = std::shared_ptr<Converter>(new ConvertDIAL());
converters[ESM::REC_QUES] = boost::shared_ptr<Converter>(new ConvertQUES()); converters[ESM::REC_QUES] = std::shared_ptr<Converter>(new ConvertQUES());
converters[recJOUR ] = boost::shared_ptr<Converter>(new ConvertJOUR()); converters[recJOUR ] = std::shared_ptr<Converter>(new ConvertJOUR());
converters[ESM::REC_SCPT] = boost::shared_ptr<Converter>(new ConvertSCPT()); converters[ESM::REC_SCPT] = std::shared_ptr<Converter>(new ConvertSCPT());
// TODO: // TODO:
// - REGN (weather in certain regions?) // - REGN (weather in certain regions?)
@ -312,7 +312,7 @@ namespace ESSImport
std::set<unsigned int> unknownRecords; std::set<unsigned int> unknownRecords;
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin(); for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
it != converters.end(); ++it) it != converters.end(); ++it)
{ {
it->second->setContext(context); it->second->setContext(context);
@ -323,7 +323,7 @@ namespace ESSImport
ESM::NAME n = esm.getRecName(); ESM::NAME n = esm.getRecName();
esm.getRecHeader(); esm.getRecHeader();
std::map<unsigned int, boost::shared_ptr<Converter> >::iterator it = converters.find(n.intval); std::map<unsigned int, std::shared_ptr<Converter> >::iterator it = converters.find(n.intval);
if (it != converters.end()) if (it != converters.end())
{ {
it->second->read(esm); it->second->read(esm);
@ -386,7 +386,7 @@ namespace ESSImport
// Writing order should be Dynamic Store -> Cells -> Player, // Writing order should be Dynamic Store -> Cells -> Player,
// so that references to dynamic records can be recognized when loading // so that references to dynamic records can be recognized when loading
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin(); for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
it != converters.end(); ++it) it != converters.end(); ++it)
{ {
if (it->second->getStage() != 0) if (it->second->getStage() != 0)
@ -399,7 +399,7 @@ namespace ESSImport
context.mPlayerBase.save(writer); context.mPlayerBase.save(writer);
writer.endRecord(ESM::REC_NPC_); writer.endRecord(ESM::REC_NPC_);
for (std::map<unsigned int, boost::shared_ptr<Converter> >::const_iterator it = converters.begin(); for (std::map<unsigned int, std::shared_ptr<Converter> >::const_iterator it = converters.begin();
it != converters.end(); ++it) it != converters.end(); ++it)
{ {
if (it->second->getStage() != 1) if (it->second->getStage() != 1)

View file

@ -3,7 +3,6 @@
#include <string> #include <string>
#include <boost/shared_ptr.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <QUndoStack> #include <QUndoStack>

View file

@ -2,7 +2,7 @@
#include <sstream> #include <sstream>
CSMFilter::AndNode::AndNode (const std::vector<boost::shared_ptr<Node> >& nodes) CSMFilter::AndNode::AndNode (const std::vector<std::shared_ptr<Node> >& nodes)
: NAryNode (nodes, "and") : NAryNode (nodes, "and")
{} {}

View file

@ -9,7 +9,7 @@ namespace CSMFilter
{ {
public: public:
AndNode (const std::vector<boost::shared_ptr<Node> >& nodes); AndNode (const std::vector<std::shared_ptr<Node> >& nodes);
virtual bool test (const CSMWorld::IdTableBase& table, int row, virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const; const std::map<int, int>& columns) const;

View file

@ -2,7 +2,7 @@
#include <sstream> #include <sstream>
CSMFilter::NAryNode::NAryNode (const std::vector<boost::shared_ptr<Node> >& nodes, CSMFilter::NAryNode::NAryNode (const std::vector<std::shared_ptr<Node> >& nodes,
const std::string& name) const std::string& name)
: mNodes (nodes), mName (name) : mNodes (nodes), mName (name)
{} {}
@ -21,7 +21,7 @@ std::vector<int> CSMFilter::NAryNode::getReferencedColumns() const
{ {
std::vector<int> columns; std::vector<int> columns;
for (std::vector<boost::shared_ptr<Node> >::const_iterator iter (mNodes.begin()); for (std::vector<std::shared_ptr<Node> >::const_iterator iter (mNodes.begin());
iter!=mNodes.end(); ++iter) iter!=mNodes.end(); ++iter)
{ {
std::vector<int> columns2 = (*iter)->getReferencedColumns(); std::vector<int> columns2 = (*iter)->getReferencedColumns();

View file

@ -4,20 +4,18 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <boost/shared_ptr.hpp>
#include "node.hpp" #include "node.hpp"
namespace CSMFilter namespace CSMFilter
{ {
class NAryNode : public Node class NAryNode : public Node
{ {
std::vector<boost::shared_ptr<Node> > mNodes; std::vector<std::shared_ptr<Node> > mNodes;
std::string mName; std::string mName;
public: public:
NAryNode (const std::vector<boost::shared_ptr<Node> >& nodes, const std::string& name); NAryNode (const std::vector<std::shared_ptr<Node> >& nodes, const std::string& name);
int getSize() const; int getSize() const;

View file

@ -3,10 +3,9 @@
#include <string> #include <string>
#include <map> #include <map>
#include <memory>
#include <vector> #include <vector>
#include <boost/shared_ptr.hpp>
#include <QMetaType> #include <QMetaType>
namespace CSMWorld namespace CSMWorld
@ -48,6 +47,6 @@ namespace CSMFilter
}; };
} }
Q_DECLARE_METATYPE (boost::shared_ptr<CSMFilter::Node>) Q_DECLARE_METATYPE (std::shared_ptr<CSMFilter::Node>)
#endif #endif

View file

@ -1,6 +1,6 @@
#include "notnode.hpp" #include "notnode.hpp"
CSMFilter::NotNode::NotNode (boost::shared_ptr<Node> child) : UnaryNode (child, "not") {} CSMFilter::NotNode::NotNode (std::shared_ptr<Node> child) : UnaryNode (child, "not") {}
bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row, bool CSMFilter::NotNode::test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const const std::map<int, int>& columns) const

View file

@ -9,7 +9,7 @@ namespace CSMFilter
{ {
public: public:
NotNode (boost::shared_ptr<Node> child); NotNode (std::shared_ptr<Node> child);
virtual bool test (const CSMWorld::IdTableBase& table, int row, virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const; const std::map<int, int>& columns) const;

View file

@ -2,7 +2,7 @@
#include <sstream> #include <sstream>
CSMFilter::OrNode::OrNode (const std::vector<boost::shared_ptr<Node> >& nodes) CSMFilter::OrNode::OrNode (const std::vector<std::shared_ptr<Node> >& nodes)
: NAryNode (nodes, "or") : NAryNode (nodes, "or")
{} {}

View file

@ -9,7 +9,7 @@ namespace CSMFilter
{ {
public: public:
OrNode (const std::vector<boost::shared_ptr<Node> >& nodes); OrNode (const std::vector<std::shared_ptr<Node> >& nodes);
virtual bool test (const CSMWorld::IdTableBase& table, int row, virtual bool test (const CSMWorld::IdTableBase& table, int row,
const std::map<int, int>& columns) const; const std::map<int, int>& columns) const;

View file

@ -235,7 +235,7 @@ CSMFilter::Token CSMFilter::Parser::getNextToken()
return Token (Token::Type_None); return Token (Token::Type_None);
} }
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot) std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty, bool ignoreOneShot)
{ {
if (Token token = getNextToken()) if (Token token = getNextToken())
{ {
@ -247,11 +247,11 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
{ {
case Token::Type_Keyword_True: case Token::Type_Keyword_True:
return boost::shared_ptr<CSMFilter::Node> (new BooleanNode (true)); return std::shared_ptr<CSMFilter::Node> (new BooleanNode (true));
case Token::Type_Keyword_False: case Token::Type_Keyword_False:
return boost::shared_ptr<CSMFilter::Node> (new BooleanNode (false)); return std::shared_ptr<CSMFilter::Node> (new BooleanNode (false));
case Token::Type_Keyword_And: case Token::Type_Keyword_And:
case Token::Type_Keyword_Or: case Token::Type_Keyword_Or:
@ -260,12 +260,12 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
case Token::Type_Keyword_Not: case Token::Type_Keyword_Not:
{ {
boost::shared_ptr<CSMFilter::Node> node = parseImp(); std::shared_ptr<CSMFilter::Node> node = parseImp();
if (mError) if (mError)
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
return boost::shared_ptr<CSMFilter::Node> (new NotNode (node)); return std::shared_ptr<CSMFilter::Node> (new NotNode (node));
} }
case Token::Type_Keyword_Text: case Token::Type_Keyword_Text:
@ -281,7 +281,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
if (!allowEmpty) if (!allowEmpty)
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
default: default:
@ -289,27 +289,27 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseImp (bool allowEmpty,
} }
} }
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyword) std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& keyword)
{ {
std::vector<boost::shared_ptr<Node> > nodes; std::vector<std::shared_ptr<Node> > nodes;
Token token = getNextToken(); Token token = getNextToken();
if (token.mType!=Token::Type_Open) if (token.mType!=Token::Type_Open)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
for (;;) for (;;)
{ {
boost::shared_ptr<Node> node = parseImp(); std::shared_ptr<Node> node = parseImp();
if (mError) if (mError)
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
nodes.push_back (node); nodes.push_back (node);
@ -318,7 +318,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& ke
if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma)) if (!token || (token.mType!=Token::Type_Close && token.mType!=Token::Type_Comma))
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
if (token.mType==Token::Type_Close) if (token.mType==Token::Type_Close)
@ -328,31 +328,31 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseNAry (const Token& ke
if (nodes.empty()) if (nodes.empty())
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
switch (keyword.mType) switch (keyword.mType)
{ {
case Token::Type_Keyword_And: return boost::shared_ptr<CSMFilter::Node> (new AndNode (nodes)); case Token::Type_Keyword_And: return std::shared_ptr<CSMFilter::Node> (new AndNode (nodes));
case Token::Type_Keyword_Or: return boost::shared_ptr<CSMFilter::Node> (new OrNode (nodes)); case Token::Type_Keyword_Or: return std::shared_ptr<CSMFilter::Node> (new OrNode (nodes));
default: error(); return boost::shared_ptr<Node>(); default: error(); return std::shared_ptr<Node>();
} }
} }
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText() std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
{ {
Token token = getNextToken(); Token token = getNextToken();
if (token.mType!=Token::Type_Open) if (token.mType!=Token::Type_Open)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
if (!token) if (!token)
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
// parse column ID // parse column ID
int columnId = -1; int columnId = -1;
@ -370,7 +370,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (columnId<0) if (columnId<0)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
@ -378,7 +378,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (token.mType!=Token::Type_Comma) if (token.mType!=Token::Type_Comma)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
// parse text pattern // parse text pattern
@ -387,7 +387,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (!token.isString()) if (!token.isString())
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
std::string text = token.mString; std::string text = token.mString;
@ -397,26 +397,26 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseText()
if (token.mType!=Token::Type_Close) if (token.mType!=Token::Type_Close)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
return boost::shared_ptr<Node> (new TextNode (columnId, text)); return std::shared_ptr<Node> (new TextNode (columnId, text));
} }
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue() std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
{ {
Token token = getNextToken(); Token token = getNextToken();
if (token.mType!=Token::Type_Open) if (token.mType!=Token::Type_Open)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
if (!token) if (!token)
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
// parse column ID // parse column ID
int columnId = -1; int columnId = -1;
@ -434,7 +434,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (columnId<0) if (columnId<0)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
@ -442,7 +442,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (token.mType!=Token::Type_Comma) if (token.mType!=Token::Type_Comma)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
// parse value // parse value
@ -467,7 +467,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open) else if (token.mType!=Token::Type_CloseSquare && token.mType!=Token::Type_Open)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
@ -481,7 +481,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (token.mType!=Token::Type_Comma) if (token.mType!=Token::Type_Comma)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
} }
else if (token.mType==Token::Type_Comma) else if (token.mType==Token::Type_Comma)
@ -491,7 +491,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
else else
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
token = getNextToken(); token = getNextToken();
@ -513,7 +513,7 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close) else if (token.mType!=Token::Type_OpenSquare && token.mType!=Token::Type_Close)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
} }
@ -522,10 +522,10 @@ boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::parseValue()
if (token.mType!=Token::Type_Close) if (token.mType!=Token::Type_Close)
{ {
error(); error();
return boost::shared_ptr<Node>(); return std::shared_ptr<Node>();
} }
return boost::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper)); return std::shared_ptr<Node> (new ValueNode (columnId, lowerType, upperType, lower, upper));
} }
void CSMFilter::Parser::error() 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)) else if (!allowPredefined || token==Token (Token::Type_OneShot))
{ {
boost::shared_ptr<Node> node = parseImp (true, token!=Token (Token::Type_OneShot)); std::shared_ptr<Node> node = parseImp (true, token!=Token (Token::Type_OneShot));
if (mError) if (mError)
return false; return false;
@ -612,7 +612,7 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined)
} }
} }
boost::shared_ptr<CSMFilter::Node> CSMFilter::Parser::getFilter() const std::shared_ptr<CSMFilter::Node> CSMFilter::Parser::getFilter() const
{ {
if (mError) if (mError)
throw std::logic_error ("No filter available"); throw std::logic_error ("No filter available");

View file

@ -1,8 +1,6 @@
#ifndef CSM_FILTER_PARSER_H #ifndef CSM_FILTER_PARSER_H
#define CSM_FILTER_PARSER_H #define CSM_FILTER_PARSER_H
#include <boost/shared_ptr.hpp>
#include "node.hpp" #include "node.hpp"
namespace CSMWorld namespace CSMWorld
@ -16,7 +14,7 @@ namespace CSMFilter
class Parser class Parser
{ {
boost::shared_ptr<Node> mFilter; std::shared_ptr<Node> mFilter;
std::string mInput; std::string mInput;
int mIndex; int mIndex;
bool mError; bool mError;
@ -31,14 +29,14 @@ namespace CSMFilter
Token checkKeywords (const Token& token); Token checkKeywords (const Token& token);
///< Turn string token into keyword token, if possible. ///< Turn string token into keyword token, if possible.
boost::shared_ptr<Node> parseImp (bool allowEmpty = false, bool ignoreOneShot = false); std::shared_ptr<Node> parseImp (bool allowEmpty = false, bool ignoreOneShot = false);
///< Will return a null-pointer, if there is nothing more to parse. ///< Will return a null-pointer, if there is nothing more to parse.
boost::shared_ptr<Node> parseNAry (const Token& keyword); std::shared_ptr<Node> parseNAry (const Token& keyword);
boost::shared_ptr<Node> parseText(); std::shared_ptr<Node> parseText();
boost::shared_ptr<Node> parseValue(); std::shared_ptr<Node> parseValue();
void error(); void error();
@ -51,7 +49,7 @@ namespace CSMFilter
/// ///
/// \return Success? /// \return Success?
boost::shared_ptr<Node> getFilter() const; std::shared_ptr<Node> getFilter() const;
///< Throws an exception if the last call to parse did not return true. ///< Throws an exception if the last call to parse did not return true.
}; };
} }

View file

@ -1,6 +1,6 @@
#include "unarynode.hpp" #include "unarynode.hpp"
CSMFilter::UnaryNode::UnaryNode (boost::shared_ptr<Node> child, const std::string& name) CSMFilter::UnaryNode::UnaryNode (std::shared_ptr<Node> child, const std::string& name)
: mChild (child), mName (name) : mChild (child), mName (name)
{} {}

View file

@ -1,20 +1,18 @@
#ifndef CSM_FILTER_UNARYNODE_H #ifndef CSM_FILTER_UNARYNODE_H
#define CSM_FILTER_UNARYNODE_H #define CSM_FILTER_UNARYNODE_H
#include <boost/shared_ptr.hpp>
#include "node.hpp" #include "node.hpp"
namespace CSMFilter namespace CSMFilter
{ {
class UnaryNode : public Node class UnaryNode : public Node
{ {
boost::shared_ptr<Node> mChild; std::shared_ptr<Node> mChild;
std::string mName; std::string mName;
public: public:
UnaryNode (boost::shared_ptr<Node> child, const std::string& name); UnaryNode (std::shared_ptr<Node> child, const std::string& name);
const Node& getChild() const; const Node& getChild() const;

View file

@ -554,12 +554,12 @@ CSMWorld::Data::~Data()
delete mReader; delete mReader;
} }
boost::shared_ptr<Resource::ResourceSystem> CSMWorld::Data::getResourceSystem() std::shared_ptr<Resource::ResourceSystem> CSMWorld::Data::getResourceSystem()
{ {
return mResourceSystem; return mResourceSystem;
} }
boost::shared_ptr<const Resource::ResourceSystem> CSMWorld::Data::getResourceSystem() const std::shared_ptr<const Resource::ResourceSystem> CSMWorld::Data::getResourceSystem() const
{ {
return mResourceSystem; return mResourceSystem;
} }
@ -891,7 +891,7 @@ void CSMWorld::Data::merge()
int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base, bool project) 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 // Don't delete the Reader yet. Some record types store a reference to the Reader to handle on-demand loading
boost::shared_ptr<ESM::ESMReader> ptr(mReader); std::shared_ptr<ESM::ESMReader> ptr(mReader);
mReaders.push_back(ptr); mReaders.push_back(ptr);
mReader = 0; 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. // 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 // We don't store non-base reader, because everything going into modified will be
// fully loaded during the initial loading process. // fully loaded during the initial loading process.
boost::shared_ptr<ESM::ESMReader> ptr(mReader); std::shared_ptr<ESM::ESMReader> ptr(mReader);
mReaders.push_back(ptr); mReaders.push_back(ptr);
} }
else else

View file

@ -119,9 +119,9 @@ namespace CSMWorld
std::map<std::string, std::map<ESM::RefNum, std::string> > mRefLoadCache; std::map<std::string, std::map<ESM::RefNum, std::string> > mRefLoadCache;
int mReaderIndex; int mReaderIndex;
boost::shared_ptr<Resource::ResourceSystem> mResourceSystem; std::shared_ptr<Resource::ResourceSystem> mResourceSystem;
std::vector<boost::shared_ptr<ESM::ESMReader> > mReaders; std::vector<std::shared_ptr<ESM::ESMReader> > mReaders;
std::map<std::string, int> mContentFileNames; std::map<std::string, int> mContentFileNames;
@ -148,9 +148,9 @@ namespace CSMWorld
const Fallback::Map* getFallbackMap() const; const Fallback::Map* getFallbackMap() const;
boost::shared_ptr<Resource::ResourceSystem> getResourceSystem(); std::shared_ptr<Resource::ResourceSystem> getResourceSystem();
boost::shared_ptr<const Resource::ResourceSystem> getResourceSystem() const; std::shared_ptr<const Resource::ResourceSystem> getResourceSystem() const;
const IdCollection<ESM::Global>& getGlobals() const; const IdCollection<ESM::Global>& getGlobals() const;

View file

@ -77,7 +77,7 @@ bool CSMWorld::IdCompletionManager::hasCompleterFor(CSMWorld::ColumnBase::Displa
return mCompleters.find(display) != mCompleters.end(); return mCompleters.find(display) != mCompleters.end();
} }
boost::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display) std::shared_ptr<QCompleter> CSMWorld::IdCompletionManager::getCompleter(CSMWorld::ColumnBase::Display display)
{ {
if (!hasCompleterFor(display)) if (!hasCompleterFor(display))
{ {
@ -99,7 +99,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data)
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id); int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
if (idColumn != -1) if (idColumn != -1)
{ {
boost::shared_ptr<QCompleter> completer = boost::make_shared<QCompleter>(table); std::shared_ptr<QCompleter> completer = std::make_shared<QCompleter>(table);
completer->setCompletionColumn(idColumn); completer->setCompletionColumn(idColumn);
// The completion role must be Qt::DisplayRole to get the ID values from the model // The completion role must be Qt::DisplayRole to get the ID values from the model
completer->setCompletionRole(Qt::DisplayRole); completer->setCompletionRole(Qt::DisplayRole);

View file

@ -3,8 +3,7 @@
#include <vector> #include <vector>
#include <map> #include <map>
#include <memory>
#include <boost/shared_ptr.hpp>
#include "columnbase.hpp" #include "columnbase.hpp"
#include "universalid.hpp" #include "universalid.hpp"
@ -20,7 +19,7 @@ namespace CSMWorld
{ {
static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes; static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes;
std::map<ColumnBase::Display, boost::shared_ptr<QCompleter> > mCompleters; std::map<ColumnBase::Display, std::shared_ptr<QCompleter> > mCompleters;
// Don't allow copying // Don't allow copying
IdCompletionManager(const IdCompletionManager &); IdCompletionManager(const IdCompletionManager &);
@ -34,7 +33,7 @@ namespace CSMWorld
IdCompletionManager(Data &data); IdCompletionManager(Data &data);
bool hasCompleterFor(ColumnBase::Display display) const; bool hasCompleterFor(ColumnBase::Display display) const;
boost::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display); std::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display);
}; };
} }

View file

@ -82,7 +82,7 @@ void CSMWorld::IdTableProxyModel::setSourceModel(QAbstractItemModel *model)
SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &))); SLOT(sourceDataChanged(const QModelIndex &, const QModelIndex &)));
} }
void CSMWorld::IdTableProxyModel::setFilter (const boost::shared_ptr<CSMFilter::Node>& filter) void CSMWorld::IdTableProxyModel::setFilter (const std::shared_ptr<CSMFilter::Node>& filter)
{ {
beginResetModel(); beginResetModel();
mFilter = filter; mFilter = filter;

View file

@ -3,8 +3,6 @@
#include <string> #include <string>
#include <boost/shared_ptr.hpp>
#include <map> #include <map>
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
@ -19,7 +17,7 @@ namespace CSMWorld
{ {
Q_OBJECT Q_OBJECT
boost::shared_ptr<CSMFilter::Node> mFilter; std::shared_ptr<CSMFilter::Node> mFilter;
std::map<int, int> mColumnMap; // column ID, column index in this model (or -1) std::map<int, int> mColumnMap; // column ID, column index in this model (or -1)
// Cache of enum values for enum columns (e.g. Modified, Record Type). // Cache of enum values for enum columns (e.g. Modified, Record Type).
@ -43,7 +41,7 @@ namespace CSMWorld
virtual void setSourceModel(QAbstractItemModel *model); virtual void setSourceModel(QAbstractItemModel *model);
void setFilter (const boost::shared_ptr<CSMFilter::Node>& filter); void setFilter (const std::shared_ptr<CSMFilter::Node>& filter);
void refreshFilter(); void refreshFilter();

View file

@ -1,8 +1,6 @@
#ifndef CSV_FILTER_EDITWIDGET_H #ifndef CSV_FILTER_EDITWIDGET_H
#define CSV_FILTER_EDITWIDGET_H #define CSV_FILTER_EDITWIDGET_H
#include <boost/shared_ptr.hpp>
#include <QLineEdit> #include <QLineEdit>
#include <QPalette> #include <QPalette>
#include <QtCore/qnamespace.h> #include <QtCore/qnamespace.h>
@ -38,7 +36,7 @@ namespace CSVFilter
signals: signals:
void filterChanged (boost::shared_ptr<CSMFilter::Node> filter); void filterChanged (std::shared_ptr<CSMFilter::Node> filter);
private: private:
std::string generateFilter(std::pair<std::string, std::vector<std::string> >& seekedString) const; std::string generateFilter(std::pair<std::string, std::vector<std::string> >& seekedString) const;

View file

@ -21,8 +21,8 @@ CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent)
setLayout (layout); setLayout (layout);
connect (mRecordFilterBox, connect (mRecordFilterBox,
SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)), SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)),
this, SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>))); this, SIGNAL (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)));
setAcceptDrops(true); setAcceptDrops(true);
} }

View file

@ -41,7 +41,7 @@ namespace CSVFilter
void dragMoveEvent(QDragMoveEvent *event); void dragMoveEvent(QDragMoveEvent *event);
signals: signals:
void recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter); void recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter);
void recordDropped (std::vector<CSMWorld::UniversalId>& types, Qt::DropAction action); void recordDropped (std::vector<CSMWorld::UniversalId>& types, Qt::DropAction action);
}; };

View file

@ -23,8 +23,8 @@ CSVFilter::RecordFilterBox::RecordFilterBox (CSMWorld::Data& data, QWidget *pare
setLayout (layout); setLayout (layout);
connect ( connect (
mEdit, SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)), mEdit, SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)),
this, SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>))); this, SIGNAL (filterChanged (std::shared_ptr<CSMFilter::Node>)));
} }
void CSVFilter::RecordFilterBox::setFilter (const std::string& filter) void CSVFilter::RecordFilterBox::setFilter (const std::string& filter)

View file

@ -1,8 +1,6 @@
#ifndef CSV_FILTER_RECORDFILTERBOX_H #ifndef CSV_FILTER_RECORDFILTERBOX_H
#define CSV_FILTER_RECORDFILTERBOX_H #define CSV_FILTER_RECORDFILTERBOX_H
#include <boost/shared_ptr.hpp>
#include <QWidget> #include <QWidget>
#include <QtCore/qnamespace.h> #include <QtCore/qnamespace.h>
@ -38,7 +36,7 @@ namespace CSVFilter
signals: signals:
void filterChanged (boost::shared_ptr<CSMFilter::Node> filter); void filterChanged (std::shared_ptr<CSMFilter::Node> filter);
}; };
} }

View file

@ -3,8 +3,6 @@
#include <string> #include <string>
#include <boost/shared_ptr.hpp>
#include <osg/ref_ptr> #include <osg/ref_ptr>
#include <osg/Referenced> #include <osg/Referenced>

View file

@ -172,7 +172,7 @@ void CompositeViewer::update()
// --------------------------------------------------- // ---------------------------------------------------
SceneWidget::SceneWidget(boost::shared_ptr<Resource::ResourceSystem> resourceSystem, QWidget *parent, Qt::WindowFlags f, SceneWidget::SceneWidget(std::shared_ptr<Resource::ResourceSystem> resourceSystem, QWidget *parent, Qt::WindowFlags f,
bool retrieveInput) bool retrieveInput)
: RenderWidget(parent, f) : RenderWidget(parent, f)
, mResourceSystem(resourceSystem) , mResourceSystem(resourceSystem)

View file

@ -10,8 +10,6 @@
#include <osgViewer/View> #include <osgViewer/View>
#include <osgViewer/CompositeViewer> #include <osgViewer/CompositeViewer>
#include <boost/shared_ptr.hpp>
#include "lightingday.hpp" #include "lightingday.hpp"
#include "lightingnight.hpp" #include "lightingnight.hpp"
#include "lightingbright.hpp" #include "lightingbright.hpp"
@ -78,7 +76,7 @@ namespace CSVRender
{ {
Q_OBJECT Q_OBJECT
public: public:
SceneWidget(boost::shared_ptr<Resource::ResourceSystem> resourceSystem, QWidget* parent = 0, SceneWidget(std::shared_ptr<Resource::ResourceSystem> resourceSystem, QWidget* parent = 0,
Qt::WindowFlags f = 0, bool retrieveInput = true); Qt::WindowFlags f = 0, bool retrieveInput = true);
virtual ~SceneWidget(); virtual ~SceneWidget();
@ -98,7 +96,7 @@ namespace CSVRender
virtual void mouseMoveEvent (QMouseEvent *event); virtual void mouseMoveEvent (QMouseEvent *event);
virtual void wheelEvent (QWheelEvent *event); virtual void wheelEvent (QWheelEvent *event);
boost::shared_ptr<Resource::ResourceSystem> mResourceSystem; std::shared_ptr<Resource::ResourceSystem> mResourceSystem;
Lighting* mLighting; Lighting* mLighting;

View file

@ -1,8 +1,6 @@
#ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H #ifndef OPENCS_VIEW_WORLDSPACEWIDGET_H
#define OPENCS_VIEW_WORLDSPACEWIDGET_H #define OPENCS_VIEW_WORLDSPACEWIDGET_H
#include <boost/shared_ptr.hpp>
#include <QTimer> #include <QTimer>
#include <osg/Vec3> #include <osg/Vec3>

View file

@ -692,7 +692,7 @@ void CSVWorld::Table::requestFocus (const std::string& id)
scrollTo (index, QAbstractItemView::PositionAtTop); scrollTo (index, QAbstractItemView::PositionAtTop);
} }
void CSVWorld::Table::recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter) void CSVWorld::Table::recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter)
{ {
mProxyModel->setFilter (filter); mProxyModel->setFilter (filter);
tableSizeUpdate(); tableSizeUpdate();

View file

@ -151,7 +151,7 @@ namespace CSVWorld
void requestFocus (const std::string& id); void requestFocus (const std::string& id);
void recordFilterChanged (boost::shared_ptr<CSMFilter::Node> filter); void recordFilterChanged (std::shared_ptr<CSMFilter::Node> filter);
void rowAdded(const std::string &id); void rowAdded(const std::string &id);
}; };

View file

@ -78,8 +78,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
mTable, SLOT (requestFocus (const std::string&))); mTable, SLOT (requestFocus (const std::string&)));
connect (mFilterBox, connect (mFilterBox,
SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)), SIGNAL (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)),
mTable, SLOT (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>))); mTable, SLOT (recordFilterChanged (std::shared_ptr<CSMFilter::Node>)));
connect(mFilterBox, SIGNAL(recordDropped(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)), connect(mFilterBox, SIGNAL(recordDropped(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)),
this, SLOT(createFilterRequest(std::vector<CSMWorld::UniversalId>&, Qt::DropAction))); this, SLOT(createFilterRequest(std::vector<CSMWorld::UniversalId>&, Qt::DropAction)));

View file

@ -28,11 +28,9 @@
#include <components/sceneutil/waterutil.hpp> #include <components/sceneutil/waterutil.hpp>
#include <components/nifosg/controller.hpp> #include <components/nifosg/controller.hpp>
#include <components/sceneutil/controller.hpp>
#include <components/shader/shadermanager.hpp> #include <components/shader/shadermanager.hpp>
#include <components/settings/settings.hpp>
#include <components/esm/loadcell.hpp> #include <components/esm/loadcell.hpp>

View file

@ -6,9 +6,11 @@
#include <QMenu> #include <QMenu>
#include <QContextMenuEvent> #include <QContextMenuEvent>
#include <QGridLayout> #include <QGridLayout>
#include <QMessageBox>
#include <QModelIndex>
#include <QDir> #include <QDir>
#include <QtGui/QAbstractItemView>
ContentSelectorView::ContentSelector::ContentSelector(QWidget *parent) : ContentSelectorView::ContentSelector::ContentSelector(QWidget *parent) :
QObject(parent) QObject(parent)

View file

@ -1,6 +1,7 @@
#include "audiodecoder.hpp" #include "audiodecoder.hpp"
#include <stdexcept> #include <stdexcept>
#include <string>
extern "C" extern "C"
{ {