Merge pull request #228 from OpenMW/master while resolving conflicts

# Conflicts:
#	.travis.yml
#	CMakeLists.txt
#	apps/openmw/main.cpp
This commit is contained in:
David Cernat 2017-06-18 18:16:10 +03:00
commit fa3baac0f3
252 changed files with 748 additions and 799 deletions

View file

@ -1,7 +1,7 @@
os: os:
- linux - linux
# - osx # - osx
osx_image: xcode8.2 osx_image: xcode8.3
language: cpp language: cpp
sudo: required sudo: required
dist: trusty dist: trusty
@ -13,7 +13,7 @@ branches:
env: env:
global: global:
- secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg= - secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg=
- macos_qt_formula=qt@5.5 - macos_qt_formula=qt@5.7
addons: addons:
apt: apt:
sources: sources:
@ -27,7 +27,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

@ -133,6 +133,7 @@ Programmers
Sebastian Wick (swick) Sebastian Wick (swick)
Sergey Shambir Sergey Shambir
ShadowRadiance ShadowRadiance
Siimacore
sir_herrbatka sir_herrbatka
smbas smbas
Stefan Galowicz (bogglez) Stefan Galowicz (bogglez)

View file

@ -6,5 +6,5 @@ brew outdated cmake || brew upgrade cmake
brew outdated pkgconfig || brew upgrade pkgconfig brew outdated pkgconfig || brew upgrade pkgconfig
brew install $macos_qt_formula brew install $macos_qt_formula
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-c79172d.zip -o ~/openmw-deps.zip curl https://downloads.openmw.org/osx/dependencies/openmw-deps-eaf8112.zip -o ~/openmw-deps.zip
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null

View file

@ -5,13 +5,12 @@ export CC=clang
DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps" DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps"
QT_PATH=`brew --prefix $macos_qt_formula` QT_PATH=`brew --prefix $macos_qt_formula`
mkdir build mkdir build
cd build cd build
cmake \ cmake \
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \ -D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \ -D CMAKE_OSX_DEPLOYMENT_TARGET="10.9" \
-D CMAKE_OSX_SYSROOT="macosx10.12" \ -D CMAKE_OSX_SYSROOT="macosx10.12" \
-D CMAKE_BUILD_TYPE=Release \ -D CMAKE_BUILD_TYPE=Release \
-D OPENMW_OSX_DEPLOYMENT=TRUE \ -D OPENMW_OSX_DEPLOYMENT=TRUE \

View file

@ -363,7 +363,13 @@ endif()
# CXX Compiler settings # CXX Compiler settings
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++98 -pedantic -Wno-long-long -Wno-variadic-macros") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long")
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE) if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.6) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.6 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 3.6)
@ -761,7 +767,7 @@ if (WIN32)
endif() endif()
# Apple bundling # Apple bundling
if (APPLE) if (APPLE AND DESIRED_QT_VERSION MATCHES 5)
get_property(QT_COCOA_PLUGIN_PATH TARGET Qt5::QCocoaIntegrationPlugin PROPERTY LOCATION_RELEASE) get_property(QT_COCOA_PLUGIN_PATH TARGET Qt5::QCocoaIntegrationPlugin PROPERTY LOCATION_RELEASE)
get_filename_component(QT_COCOA_PLUGIN_DIR "${QT_COCOA_PLUGIN_PATH}" DIRECTORY) get_filename_component(QT_COCOA_PLUGIN_DIR "${QT_COCOA_PLUGIN_PATH}" DIRECTORY)
get_filename_component(QT_COCOA_PLUGIN_GROUP "${QT_COCOA_PLUGIN_DIR}" NAME) get_filename_component(QT_COCOA_PLUGIN_GROUP "${QT_COCOA_PLUGIN_DIR}" NAME)
@ -846,7 +852,7 @@ if (APPLE)
fixup_bundle(\"${INSTALLED_OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"\") fixup_bundle(\"${INSTALLED_OPENCS_APP}\" \"${OPENCS_PLUGINS}\" \"\")
" COMPONENT Runtime) " COMPONENT Runtime)
include(CPack) include(CPack)
endif (APPLE) endif (APPLE AND DESIRED_QT_VERSION MATCHES 5)
# Doxygen Target -- simply run 'make doc' or 'make doc_pages' # Doxygen Target -- simply run 'make doc' or 'make doc_pages'
# output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen" # output directory for 'make doc' is "${OpenMW_BINARY_DIR}/docs/Doxygen"

View file

@ -1,16 +1,35 @@
Description How to contribute to OpenMW
=========== =======================
Your pull request description should include (if applicable): Not sure what to do with all your free time? Pick out a task from here:
http://bugs.openmw.org/
Currently, we are focused on completing the MW game experience and general polishing. Features out of this scope may be approved in some cases, but you should probably start a discussion first.
Note:
- Tasks set to 'openmw-future' are usually out of the current scope of the project and can't be started yet.
- Bugs that are not 'Confirmed' should be confirmed first.
- Larger Features should have a discussion before you start implementing.
- In many cases, it's best to have a discussion about possible solutions before you jump into coding.
Aside from coding, you can also help by triaging the issues list. Check for bugs that are 'Unconfirmed' and try to confirm them on your end, working out any details that may be necessary. Check for bugs that do not conform to [Bug reporting guidelines](https://wiki.openmw.org/index.php?title=Bug_Reporting_Guidelines) and improve them to do so!
There are various [Tools](https://wiki.openmw.org/index.php?title=Tools) to facilitate testing/development.
Pull Request Guidelines
=======================
Thought of a change? Great! To facilitate the review process, your pull request description should include the following (if applicable):
* A link back to the bug report or forum discussion that prompted the change * A link back to the bug report or forum discussion that prompted the change
* Summary of the changes made * Summary of the changes made
* Reasoning / motivation behind the change * Reasoning / motivation behind the change
* What testing you have carried out to verify the change * What testing you have carried out to verify the change
Other notes Furthermore, we advise to:
===========
* Separate your work into multiple pull requests whenever possible. As a rule of thumb, each feature and each bugfix should go into a separate PR, unless they are closely related or dependent upon each other. Small pull requests are easier to review, and are less likely to require further changes before we can merge them. A "mega" pull request with lots of unrelated commits in it is likely to get held up in review for a long time. * Separate your work into multiple pull requests whenever possible. As a rule of thumb, each feature and each bugfix should go into a separate PR, unless they are closely related or dependent upon each other. Small pull requests are easier to review, and are less likely to require further changes before we can merge them. A "mega" pull request with lots of unrelated commits in it is likely to get held up in review for a long time.
* Feel free to submit incomplete pull requests. Even if the work can not be merged yet, pull requests are a great place to collect early feedback. Just make sure to mark it as *[Incomplete]* or *[Do not merge yet]* in the title. * Feel free to submit incomplete pull requests. Even if the work can not be merged yet, pull requests are a great place to collect early feedback. Just make sure to mark it as *[Incomplete]* or *[Do not merge yet]* in the title.
* If you plan on contributing often, please read the [Developer Reference](https://wiki.openmw.org/index.php?title=Developer_Reference) on our wiki, especially the [Policies and Standards](https://wiki.openmw.org/index.php?title=Policies_and_Standards). * If you plan on contributing often, please read the [Developer Reference](https://wiki.openmw.org/index.php?title=Developer_Reference) on our wiki, especially the [Policies and Standards](https://wiki.openmw.org/index.php?title=Policies_and_Standards).
* Make sure each of your changes has a clear objective. Unnecessary changes may lead to merge conflicts, clutter the commit history and slow down review. Code formatting 'fixes' should be avoided, unless you were already changing that particular line anyway.

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

@ -11,7 +11,6 @@
#include <components/esm/loadrace.hpp> #include <components/esm/loadrace.hpp>
#include <components/esm/loadspel.hpp> #include <components/esm/loadspel.hpp>
#include <components/esm/loadweap.hpp> #include <components/esm/loadweap.hpp>
#include <components/esm/aipackage.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>

View file

@ -2,7 +2,7 @@
#include <iomanip> #include <iomanip>
#include <boost/shared_ptr.hpp> #include <boost/filesystem/fstream.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

@ -2,8 +2,6 @@
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>

View file

@ -1,5 +1,6 @@
#include "graphicspage.hpp" #include "graphicspage.hpp"
#include <boost/math/common_factor.hpp>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QMessageBox> #include <QMessageBox>
#include <QDir> #include <QDir>
@ -12,14 +13,8 @@
#include <SDL_video.h> #include <SDL_video.h>
#include <boost/math/common_factor.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/contentselector/model/naturalsort.hpp>
#include <components/settings/settings.hpp>
QString getAspect(int x, int y) QString getAspect(int x, int y)
{ {
int gcd = boost::math::gcd (x, y); int gcd = boost::math::gcd (x, y);

View file

@ -172,6 +172,9 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
} }
} }
if(!setupGameData())
return FirstRunDialogResultFailure;
return setup() ? FirstRunDialogResultContinue : FirstRunDialogResultFailure; return setup() ? FirstRunDialogResultContinue : FirstRunDialogResultFailure;
} }
@ -344,6 +347,10 @@ bool Launcher::MainDialog::setupGameSettings()
file.close(); file.close();
} }
return true;
}
bool Launcher::MainDialog::setupGameData() {
QStringList dataDirs; QStringList dataDirs;
// Check if the paths actually contain data files // Check if the paths actually contain data files
@ -379,7 +386,6 @@ bool Launcher::MainDialog::setupGameSettings()
} }
} }
} }
return true; return true;
} }

View file

@ -72,6 +72,7 @@ namespace Launcher
bool setupLauncherSettings(); bool setupLauncherSettings();
bool setupGameSettings(); bool setupGameSettings();
bool setupGraphicsSettings(); bool setupGraphicsSettings();
bool setupGameData();
void setVersionLabel(); void setVersionLabel();

View file

@ -1,17 +1,12 @@
#include "importer.hpp" #include "importer.hpp"
#include <ctime>
#include <iostream> #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <sstream> #include <sstream>
#include <components/misc/stringops.hpp> #include <components/misc/stringops.hpp>
#include <boost/version.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include <boost/version.hpp>
namespace bfs = boost::filesystem; namespace bfs = boost::filesystem;

View file

@ -1,11 +1,9 @@
#include "importer.hpp" #include "importer.hpp"
#include <string>
#include <iostream> #include <iostream>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
namespace bpo = boost::program_options; namespace bpo = boost::program_options;

View file

@ -47,7 +47,7 @@ namespace CS
Q_OBJECT Q_OBJECT
// FIXME: should be moved to document, so we can have different resources for each opened project // FIXME: should be moved to document, so we can have different resources for each opened project
std::auto_ptr<VFS::Manager> mVFS; std::unique_ptr<VFS::Manager> mVFS;
Files::ConfigurationManager mCfgMgr; Files::ConfigurationManager mCfgMgr;
CSMPrefs::State mSettingsState; CSMPrefs::State mSettingsState;

View file

@ -5,6 +5,7 @@
#include <iostream> #include <iostream>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include "../world/defaultgmsts.hpp" #include "../world/defaultgmsts.hpp"
@ -415,9 +416,9 @@ void CSMDoc::Document::runSearch (const CSMWorld::UniversalId& searchId, const C
emit stateChanged (getState(), this); emit stateChanged (getState(), this);
} }
void CSMDoc::Document::runMerge (std::auto_ptr<CSMDoc::Document> target) void CSMDoc::Document::runMerge (std::unique_ptr<CSMDoc::Document> target)
{ {
mTools.runMerge (target); mTools.runMerge (std::move(target));
emit stateChanged (getState(), this); emit stateChanged (getState(), this);
} }

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>
@ -137,7 +136,7 @@ namespace CSMDoc
void runSearch (const CSMWorld::UniversalId& searchId, const CSMTools::Search& search); void runSearch (const CSMWorld::UniversalId& searchId, const CSMTools::Search& search);
void runMerge (std::auto_ptr<CSMDoc::Document> target); void runMerge (std::unique_ptr<CSMDoc::Document> target);
void abortOperation (int type); void abortOperation (int type);

View file

@ -1,8 +1,5 @@
#include "documentmanager.hpp" #include "documentmanager.hpp"
#include <algorithm>
#include <stdexcept>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN

View file

@ -1,20 +1,15 @@
#include "savingstages.hpp" #include "savingstages.hpp"
#include <fstream>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <QUndoStack> #include <QUndoStack>
#include <components/esm/loaddial.hpp> #include <components/esm/loaddial.hpp>
#include <components/misc/stringops.hpp>
#include "../world/infocollection.hpp" #include "../world/infocollection.hpp"
#include "../world/cellcoordinates.hpp" #include "../world/cellcoordinates.hpp"
#include "document.hpp" #include "document.hpp"
#include "savingstate.hpp"
CSMDoc::OpenSaveStage::OpenSaveStage (Document& document, SavingState& state, bool projectFile) CSMDoc::OpenSaveStage::OpenSaveStage (Document& document, SavingState& state, bool projectFile)
: mDocument (document), mState (state), mProjectFile (projectFile) : mDocument (document), mState (state), mProjectFile (projectFile)

View file

@ -1,5 +1,7 @@
#include "savingstate.hpp" #include "savingstate.hpp"
#include <boost/filesystem/fstream.hpp>
#include "operation.hpp" #include "operation.hpp"
#include "document.hpp" #include "document.hpp"

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

@ -45,9 +45,9 @@ CSMTools::MergeOperation::MergeOperation (CSMDoc::Document& document, ToUTF8::Fr
appendStage (new FinishMergedDocumentStage (mState, encoding)); appendStage (new FinishMergedDocumentStage (mState, encoding));
} }
void CSMTools::MergeOperation::setTarget (std::auto_ptr<CSMDoc::Document> document) void CSMTools::MergeOperation::setTarget (std::unique_ptr<CSMDoc::Document> document)
{ {
mState.mTarget = document; mState.mTarget = std::move(document);
} }
void CSMTools::MergeOperation::operationDone() void CSMTools::MergeOperation::operationDone()

View file

@ -27,7 +27,7 @@ namespace CSMTools
MergeOperation (CSMDoc::Document& document, ToUTF8::FromType encoding); MergeOperation (CSMDoc::Document& document, ToUTF8::FromType encoding);
/// \attention Do not call this function while a merge is running. /// \attention Do not call this function while a merge is running.
void setTarget (std::auto_ptr<CSMDoc::Document> document); void setTarget (std::unique_ptr<CSMDoc::Document> document);
protected slots: protected slots:

View file

@ -12,7 +12,7 @@ namespace CSMTools
{ {
struct MergeState struct MergeState
{ {
std::auto_ptr<CSMDoc::Document> mTarget; std::unique_ptr<CSMDoc::Document> mTarget;
CSMDoc::Document& mSource; CSMDoc::Document& mSource;
bool mCompleted; bool mCompleted;
std::map<std::pair<uint16_t, int>, int> mTextureIndices; // (texture, content file) -> new texture std::map<std::pair<uint16_t, int>, int> mTextureIndices; // (texture, content file) -> new texture

View file

@ -1,7 +1,5 @@
#include "referencecheck.hpp" #include "referencecheck.hpp"
#include <boost/lexical_cast.hpp>
CSMTools::ReferenceCheckStage::ReferenceCheckStage( CSMTools::ReferenceCheckStage::ReferenceCheckStage(
const CSMWorld::RefCollection& references, const CSMWorld::RefCollection& references,
const CSMWorld::RefIdCollection& referencables, const CSMWorld::RefIdCollection& referencables,
@ -40,9 +38,9 @@ void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &message
if ((isLight && cellRef.mChargeFloat < -1) || (!isLight && cellRef.mChargeInt < -1)) { if ((isLight && cellRef.mChargeFloat < -1) || (!isLight && cellRef.mChargeInt < -1)) {
std::string str = " has invalid charge "; std::string str = " has invalid charge ";
if (localIndex.second == CSMWorld::UniversalId::Type_Light) if (localIndex.second == CSMWorld::UniversalId::Type_Light)
str += boost::lexical_cast<std::string>(cellRef.mChargeFloat); str += std::to_string(cellRef.mChargeFloat);
else else
str += boost::lexical_cast<std::string>(cellRef.mChargeInt); str += std::to_string(cellRef.mChargeInt);
messages.push_back(std::make_pair(id, id.getId() + str)); messages.push_back(std::make_pair(id, id.getId() + str));
} }
} }
@ -66,9 +64,9 @@ void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &message
// Check item's faction rank // Check item's faction rank
if (hasFaction && cellRef.mFactionRank < -1) if (hasFaction && cellRef.mFactionRank < -1)
messages.push_back(std::make_pair(id, " has faction set but has invalid faction rank " + boost::lexical_cast<std::string>(cellRef.mFactionRank))); messages.push_back(std::make_pair(id, " has faction set but has invalid faction rank " + std::to_string(cellRef.mFactionRank)));
else if (!hasFaction && cellRef.mFactionRank != -2) else if (!hasFaction && cellRef.mFactionRank != -2)
messages.push_back(std::make_pair(id, " has invalid faction rank " + boost::lexical_cast<std::string>(cellRef.mFactionRank))); messages.push_back(std::make_pair(id, " has invalid faction rank " + std::to_string(cellRef.mFactionRank)));
// If door have destination cell, check if that reference is valid // If door have destination cell, check if that reference is valid
if (!cellRef.mDestCell.empty()) if (!cellRef.mDestCell.empty())
@ -79,7 +77,7 @@ void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &message
if (cellRef.mScale < 0) if (cellRef.mScale < 0)
{ {
std::string str = " has negative scale "; std::string str = " has negative scale ";
str += boost::lexical_cast<std::string>(cellRef.mScale); str += std::to_string(cellRef.mScale);
messages.push_back(std::make_pair(id, id.getId() + str)); messages.push_back(std::make_pair(id, id.getId() + str));
} }
@ -87,7 +85,7 @@ void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &message
if (cellRef.mEnchantmentCharge < 0 && cellRef.mEnchantmentCharge != -1) if (cellRef.mEnchantmentCharge < 0 && cellRef.mEnchantmentCharge != -1)
{ {
std::string str = " has negative enchantment points "; std::string str = " has negative enchantment points ";
str += boost::lexical_cast<std::string>(cellRef.mEnchantmentCharge); str += std::to_string(cellRef.mEnchantmentCharge);
messages.push_back(std::make_pair(id, id.getId() + str)); messages.push_back(std::make_pair(id, id.getId() + str));
} }

View file

@ -216,7 +216,7 @@ void CSMTools::Tools::runSearch (const CSMWorld::UniversalId& searchId, const Se
mSearch.start(); mSearch.start();
} }
void CSMTools::Tools::runMerge (std::auto_ptr<CSMDoc::Document> target) void CSMTools::Tools::runMerge (std::unique_ptr<CSMDoc::Document> target)
{ {
// not setting an active report, because merge does not produce messages // not setting an active report, because merge does not produce messages
@ -230,7 +230,7 @@ void CSMTools::Tools::runMerge (std::auto_ptr<CSMDoc::Document> target)
target->flagAsDirty(); target->flagAsDirty();
mMergeOperation->setTarget (target); mMergeOperation->setTarget (std::move(target));
mMerge.start(); mMerge.start();
} }

View file

@ -77,7 +77,7 @@ namespace CSMTools
void runSearch (const CSMWorld::UniversalId& searchId, const Search& search); void runSearch (const CSMWorld::UniversalId& searchId, const Search& search);
void runMerge (std::auto_ptr<CSMDoc::Document> target); void runMerge (std::unique_ptr<CSMDoc::Document> target);
void abortOperation (int type); void abortOperation (int type);
///< \attention The operation is not aborted immediately. ///< \attention The operation is not aborted immediately.

View file

@ -5,8 +5,6 @@
#include <sstream> #include <sstream>
#include <stdexcept> #include <stdexcept>
#include <boost/lexical_cast.hpp>
#include <QColor> #include <QColor>
#include <components/esm/loadbody.hpp> #include <components/esm/loadbody.hpp>

View file

@ -138,7 +138,7 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons
if (mLocked) if (mLocked)
return; return;
std::auto_ptr<CSMWorld::UpdateCellCommand> modifyCell; std::unique_ptr<CSMWorld::UpdateCellCommand> modifyCell;
int columnId = model->data (index, ColumnBase::Role_ColumnId).toInt(); int columnId = model->data (index, ColumnBase::Role_ColumnId).toInt();
@ -167,7 +167,7 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons
} }
} }
std::auto_ptr<CSMWorld::ModifyCommand> modifyData ( std::unique_ptr<CSMWorld::ModifyCommand> modifyData (
new CSMWorld::ModifyCommand (*model, index, new_)); new CSMWorld::ModifyCommand (*model, index, new_));
if (modifyCell.get()) if (modifyCell.get())

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

@ -1,7 +1,5 @@
#include "idcompletionmanager.hpp" #include "idcompletionmanager.hpp"
#include <boost/make_shared.hpp>
#include <QCompleter> #include <QCompleter>
#include "../../view/widget/completerpopup.hpp" #include "../../view/widget/completerpopup.hpp"
@ -77,7 +75,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 +97,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

@ -808,7 +808,7 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin,
const std::string& destination, const std::string& destination,
const CSMWorld::UniversalId::Type type) const CSMWorld::UniversalId::Type type)
{ {
std::auto_ptr<RecordBase> newRecord(mData.getRecord(mData.searchId(origin)).modifiedCopy()); std::unique_ptr<RecordBase> newRecord(mData.getRecord(mData.searchId(origin)).modifiedCopy());
mAdapters.find(type)->second->setId(*newRecord, destination); mAdapters.find(type)->second->setId(*newRecord, destination);
mData.insertRecord(*newRecord, type, destination); mData.insertRecord(*newRecord, type, destination);
} }

View file

@ -389,7 +389,7 @@ void CSMWorld::RefIdData::copyTo (int index, RefIdData& target) const
std::string id = source->getId (localIndex.first); std::string id = source->getId (localIndex.first);
std::auto_ptr<CSMWorld::RecordBase> newRecord (source->getRecord (localIndex.first).modifiedCopy()); std::unique_ptr<CSMWorld::RecordBase> newRecord (source->getRecord (localIndex.first).modifiedCopy());
target.insertRecord (*newRecord, localIndex.second, id); target.insertRecord (*newRecord, localIndex.second, id);
} }

View file

@ -1,8 +1,5 @@
#include "adjusterwidget.hpp" #include "adjusterwidget.hpp"
#include <stdexcept>
#include <string>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/algorithm/string/case_conv.hpp> #include <boost/algorithm/string/case_conv.hpp>

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

@ -62,7 +62,7 @@ bool CSVRender::Cell::addObjects (int start, int end)
{ {
std::string id = Misc::StringUtils::lowerCase (collection.getRecord (i).get().mId); std::string id = Misc::StringUtils::lowerCase (collection.getRecord (i).get().mId);
std::auto_ptr<Object> object (new Object (mData, mCellNode, id, false)); std::unique_ptr<Object> object (new Object (mData, mCellNode, id, false));
if (mSubModeElementMask & Mask_Reference) if (mSubModeElementMask & Mask_Reference)
object->setSubMode (mSubMode); object->setSubMode (mSubMode);

View file

@ -47,13 +47,13 @@ namespace CSVRender
std::string mId; std::string mId;
osg::ref_ptr<osg::Group> mCellNode; osg::ref_ptr<osg::Group> mCellNode;
std::map<std::string, Object *> mObjects; std::map<std::string, Object *> mObjects;
std::auto_ptr<Terrain::TerrainGrid> mTerrain; std::unique_ptr<Terrain::TerrainGrid> mTerrain;
CSMWorld::CellCoordinates mCoordinates; CSMWorld::CellCoordinates mCoordinates;
std::auto_ptr<CellArrow> mCellArrows[4]; std::unique_ptr<CellArrow> mCellArrows[4];
std::auto_ptr<CellMarker> mCellMarker; std::unique_ptr<CellMarker> mCellMarker;
std::auto_ptr<CellBorder> mCellBorder; std::unique_ptr<CellBorder> mCellBorder;
std::auto_ptr<CellWater> mCellWater; std::unique_ptr<CellWater> mCellWater;
std::auto_ptr<Pathgrid> mPathgrid; std::unique_ptr<Pathgrid> mPathgrid;
bool mDeleted; bool mDeleted;
int mSubMode; int mSubMode;
unsigned int mSubModeElementMask; unsigned int mSubModeElementMask;

View file

@ -1,15 +1,10 @@
#include "cellmarker.hpp" #include "cellmarker.hpp"
#include <boost/lexical_cast.hpp>
#include <osg/AutoTransform> #include <osg/AutoTransform>
#include <osg/Material> #include <osg/Material>
#include <osg/Geode> #include <osg/Geode>
#include <osg/Group>
#include <osgText/Text> #include <osgText/Text>
#include "mask.hpp"
CSVRender::CellMarkerTag::CellMarkerTag(CellMarker *marker) CSVRender::CellMarkerTag::CellMarkerTag(CellMarker *marker)
: TagBase(Mask_CellMarker), mMarker(marker) : TagBase(Mask_CellMarker), mMarker(marker)
{} {}
@ -42,8 +37,8 @@ void CSVRender::CellMarker::buildMarker()
// Add text containing cell's coordinates. // Add text containing cell's coordinates.
std::string coordinatesText = std::string coordinatesText =
boost::lexical_cast<std::string>(mCoordinates.getX()) + "," + std::to_string(mCoordinates.getX()) + "," +
boost::lexical_cast<std::string>(mCoordinates.getY()); std::to_string(mCoordinates.getY());
markerText->setText(coordinatesText); markerText->setText(coordinatesText);
// Add text to marker node. // Add text to marker node.

View file

@ -559,7 +559,7 @@ void CSVRender::InstanceMode::dropEvent (QDropEvent* event)
if (mode=="Create cell and insert") if (mode=="Create cell and insert")
{ {
std::auto_ptr<CSMWorld::CreateCommand> createCommand ( std::unique_ptr<CSMWorld::CreateCommand> createCommand (
new CSMWorld::CreateCommand (cellTable, cellId)); new CSMWorld::CreateCommand (cellTable, cellId));
int parentIndex = cellTable.findColumnIndex (CSMWorld::Columns::ColumnId_Cell); int parentIndex = cellTable.findColumnIndex (CSMWorld::Columns::ColumnId_Cell);
@ -610,7 +610,7 @@ void CSVRender::InstanceMode::dropEvent (QDropEvent* event)
if (mime->isReferencable (iter->getType())) if (mime->isReferencable (iter->getType()))
{ {
// create reference // create reference
std::auto_ptr<CSMWorld::CreateCommand> createCommand ( std::unique_ptr<CSMWorld::CreateCommand> createCommand (
new CSMWorld::CreateCommand ( new CSMWorld::CreateCommand (
referencesTable, document.getData().getReferences().getNewId())); referencesTable, document.getData().getReferences().getNewId()));

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

@ -54,7 +54,7 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells()
{ {
modified = true; modified = true;
std::auto_ptr<Cell> cell (new Cell (mDocument.getData(), mRootNode, std::unique_ptr<Cell> cell (new Cell (mDocument.getData(), mRootNode,
iter->first.getId (mWorldspace), deleted)); iter->first.getId (mWorldspace), deleted));
delete iter->second; delete iter->second;
@ -378,7 +378,7 @@ void CSVRender::PagedWorldspaceWidget::addCellToScene (
bool deleted = index==-1 || bool deleted = index==-1 ||
cells.getRecord (index).mState==CSMWorld::RecordBase::State_Deleted; cells.getRecord (index).mState==CSMWorld::RecordBase::State_Deleted;
std::auto_ptr<Cell> cell ( std::unique_ptr<Cell> cell (
new Cell (mDocument.getData(), mRootNode, coordinates.getId (mWorldspace), new Cell (mDocument.getData(), mRootNode, coordinates.getId (mWorldspace),
deleted)); deleted));
EditMode *editMode = getEditMode(); EditMode *editMode = getEditMode();

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

@ -29,7 +29,7 @@ namespace CSVRender
std::string mCellId; std::string mCellId;
CSMWorld::IdTable *mCellsModel; CSMWorld::IdTable *mCellsModel;
CSMWorld::IdTable *mReferenceablesModel; CSMWorld::IdTable *mReferenceablesModel;
std::auto_ptr<Cell> mCell; std::unique_ptr<Cell> mCell;
void update(); void update();

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

@ -127,10 +127,10 @@ void CSVTools::Merge::accept()
{ {
std::vector< boost::filesystem::path > files (1, mAdjuster->getPath()); std::vector< boost::filesystem::path > files (1, mAdjuster->getPath());
std::auto_ptr<CSMDoc::Document> target ( std::unique_ptr<CSMDoc::Document> target (
mDocumentManager.makeDocument (files, files[0], true)); mDocumentManager.makeDocument (files, files[0], true));
mDocument->runMerge (target); mDocument->runMerge (std::move(target));
hide(); hide();
} }

View file

@ -91,7 +91,7 @@ namespace CSVWorld
Creator *CreatorFactory<CreatorT, scope>::makeCreator (CSMDoc::Document& document, Creator *CreatorFactory<CreatorT, scope>::makeCreator (CSMDoc::Document& document,
const CSMWorld::UniversalId& id) const const CSMWorld::UniversalId& id) const
{ {
std::auto_ptr<CreatorT> creator (new CreatorT (document.getData(), document.getUndoStack(), id)); std::unique_ptr<CreatorT> creator (new CreatorT (document.getData(), document.getUndoStack(), id));
creator->setScope (scope); creator->setScope (scope);

View file

@ -120,7 +120,7 @@ mIndex(index)
CSVWorld::DialogueDelegateDispatcherProxy::DialogueDelegateDispatcherProxy(QWidget* editor, CSMWorld::ColumnBase::Display display) : CSVWorld::DialogueDelegateDispatcherProxy::DialogueDelegateDispatcherProxy(QWidget* editor, CSMWorld::ColumnBase::Display display) :
mEditor(editor), mEditor(editor),
mDisplay(display), mDisplay(display),
mIndexWrapper(NULL) mIndexWrapper(nullptr)
{ {
} }

View file

@ -84,7 +84,7 @@ namespace CSVWorld
CSMWorld::ColumnBase::Display mDisplay; CSMWorld::ColumnBase::Display mDisplay;
std::auto_ptr<refWrapper> mIndexWrapper; std::unique_ptr<refWrapper> mIndexWrapper;
public: public:
DialogueDelegateDispatcherProxy(QWidget* editor, DialogueDelegateDispatcherProxy(QWidget* editor,

View file

@ -63,7 +63,7 @@ std::string CSVWorld::GenericCreator::getIdValidatorResult() const
void CSVWorld::GenericCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const {} void CSVWorld::GenericCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const {}
void CSVWorld::GenericCreator::pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command, void CSVWorld::GenericCreator::pushCommand (std::unique_ptr<CSMWorld::CreateCommand> command,
const std::string& id) const std::string& id)
{ {
mUndoStack.push (command.release()); mUndoStack.push (command.release());
@ -224,7 +224,7 @@ void CSVWorld::GenericCreator::create()
{ {
std::string id = getId(); std::string id = getId();
std::auto_ptr<CSMWorld::CreateCommand> command; std::unique_ptr<CSMWorld::CreateCommand> command;
if (mCloneMode) if (mCloneMode)
{ {
@ -239,7 +239,7 @@ void CSVWorld::GenericCreator::create()
} }
configureCreateCommand (*command); configureCreateCommand (*command);
pushCommand (command, id); pushCommand (std::move(command), id);
emit done(); emit done();
emit requestFocus(id); emit requestFocus(id);

View file

@ -71,7 +71,7 @@ namespace CSVWorld
/// Allow subclasses to wrap the create command together with additional commands /// Allow subclasses to wrap the create command together with additional commands
/// into a macro. /// into a macro.
virtual void pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command, virtual void pushCommand (std::unique_ptr<CSMWorld::CreateCommand> command,
const std::string& id); const std::string& id);
CSMWorld::Data& getData() const; CSMWorld::Data& getData() const;

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

@ -1,6 +1,5 @@
#include "engine.hpp" #include "engine.hpp"
#include <stdexcept>
#include <iomanip> #include <iomanip>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
@ -28,7 +27,6 @@
#include <components/sceneutil/workqueue.hpp> #include <components/sceneutil/workqueue.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
#include <components/translation/translation.hpp>
#include <components/version/version.hpp> #include <components/version/version.hpp>
#include <components/openmw-mp/Log.hpp> #include <components/openmw-mp/Log.hpp>

View file

@ -71,8 +71,8 @@ namespace OMW
class Engine class Engine
{ {
SDL_Window* mWindow; SDL_Window* mWindow;
std::auto_ptr<VFS::Manager> mVFS; std::unique_ptr<VFS::Manager> mVFS;
std::auto_ptr<Resource::ResourceSystem> mResourceSystem; std::unique_ptr<Resource::ResourceSystem> mResourceSystem;
osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue; osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue;
MWBase::Environment mEnvironment; MWBase::Environment mEnvironment;
ToUTF8::FromType mEncoding; ToUTF8::FromType mEncoding;

View file

@ -1,5 +1,4 @@
#include <iostream> #include <iostream>
#include <cstdio>
#include <components/version/version.hpp> #include <components/version/version.hpp>
#include <components/files/configurationmanager.hpp> #include <components/files/configurationmanager.hpp>
@ -7,11 +6,8 @@
#include <components/fallback/validate.hpp> #include <components/fallback/validate.hpp>
#include <SDL_messagebox.h> #include <SDL_messagebox.h>
#include <SDL_main.h>
#include "engine.hpp" #include "engine.hpp"
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream_buffer.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include "mwmp/Main.hpp" #include "mwmp/Main.hpp"
@ -38,8 +34,8 @@ extern int cc_install_handlers(int argc, char **argv, int num_signals, int *sigs
extern int is_debugger_attached(void); extern int is_debugger_attached(void);
#endif #endif
#include <boost/version.hpp>
#include <components/openmw-mp/Log.hpp> #include <components/openmw-mp/Log.hpp>
/** /**
* Workaround for problems with whitespaces in paths in older versions of Boost library * Workaround for problems with whitespaces in paths in older versions of Boost library
*/ */
@ -316,7 +312,7 @@ int main(int argc, char**argv)
boost::filesystem::ofstream logfile; boost::filesystem::ofstream logfile;
std::auto_ptr<OMW::Engine> engine; std::unique_ptr<OMW::Engine> engine;
int ret = 0; int ret = 0;
try try

View file

@ -1,9 +1,9 @@
#ifndef GAME_MWBASE_SOUNDMANAGER_H #ifndef GAME_MWBASE_SOUNDMANAGER_H
#define GAME_MWBASE_SOUNDMANAGER_H #define GAME_MWBASE_SOUNDMANAGER_H
#include <memory>
#include <string> #include <string>
#include <set> #include <set>
#include <boost/shared_ptr.hpp>
#include "../mwworld/ptr.hpp" #include "../mwworld/ptr.hpp"
@ -17,13 +17,13 @@ namespace MWSound
class Sound; class Sound;
class Stream; class Stream;
struct Sound_Decoder; struct Sound_Decoder;
typedef boost::shared_ptr<Sound_Decoder> DecoderPtr; typedef std::shared_ptr<Sound_Decoder> DecoderPtr;
} }
namespace MWBase namespace MWBase
{ {
typedef boost::shared_ptr<MWSound::Sound> SoundPtr; typedef std::shared_ptr<MWSound::Sound> SoundPtr;
typedef boost::shared_ptr<MWSound::Stream> SoundStreamPtr; typedef std::shared_ptr<MWSound::Stream> SoundStreamPtr;
/// \brief Interface for sound manager (implemented in MWSound) /// \brief Interface for sound manager (implemented in MWSound)
class SoundManager class SoundManager

View file

@ -388,6 +388,7 @@ namespace MWBase
///Is the head of the creature underwater? ///Is the head of the creature underwater?
virtual bool isSubmerged(const MWWorld::ConstPtr &object) const = 0; virtual bool isSubmerged(const MWWorld::ConstPtr &object) const = 0;
virtual bool isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const = 0; virtual bool isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const = 0;
virtual bool isUnderwater(const MWWorld::ConstPtr &object, const float heightRatio) const = 0;
virtual bool isWaterWalkingCastableOnTarget(const MWWorld::ConstPtr &target) const = 0; virtual bool isWaterWalkingCastableOnTarget(const MWWorld::ConstPtr &target) const = 0;
virtual bool isOnGround(const MWWorld::Ptr &ptr) const = 0; virtual bool isOnGround(const MWWorld::Ptr &ptr) const = 0;

View file

@ -73,7 +73,7 @@ namespace MWClass
void Activator::registerSelf() void Activator::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Activator); std::shared_ptr<Class> instance (new Activator);
registerClass (typeid (ESM::Activator).name(), instance); registerClass (typeid (ESM::Activator).name(), instance);
} }
@ -107,19 +107,19 @@ namespace MWClass
return info; return info;
} }
boost::shared_ptr<MWWorld::Action> Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const std::shared_ptr<MWWorld::Action> Activator::activate(const MWWorld::Ptr &ptr, const MWWorld::Ptr &actor) const
{ {
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
{ {
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfActivator"); const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfActivator");
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
if(sound) action->setSound(sound->mId); if(sound) action->setSound(sound->mId);
return action; return action;
} }
return boost::shared_ptr<MWWorld::Action>(new MWWorld::NullAction); return std::shared_ptr<MWWorld::Action>(new MWWorld::NullAction);
} }

View file

@ -33,7 +33,7 @@ namespace MWClass
virtual std::string getScript (const MWWorld::ConstPtr& ptr) const; virtual std::string getScript (const MWWorld::ConstPtr& ptr) const;
///< Return name of the script attached to ptr ///< Return name of the script attached to ptr
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const; virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
static void registerSelf(); static void registerSelf();

View file

@ -51,7 +51,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Apparatus::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
return defaultItemActivate(ptr, actor); return defaultItemActivate(ptr, actor);
@ -73,7 +73,7 @@ namespace MWClass
void Apparatus::registerSelf() void Apparatus::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Apparatus); std::shared_ptr<Class> instance (new Apparatus);
registerClass (typeid (ESM::Apparatus).name(), instance); registerClass (typeid (ESM::Apparatus).name(), instance);
} }
@ -125,9 +125,9 @@ namespace MWClass
} }
boost::shared_ptr<MWWorld::Action> Apparatus::use (const MWWorld::Ptr& ptr) const std::shared_ptr<MWWorld::Action> Apparatus::use (const MWWorld::Ptr& ptr) const
{ {
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionAlchemy()); return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionAlchemy());
} }
MWWorld::Ptr Apparatus::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const MWWorld::Ptr Apparatus::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const

View file

@ -23,7 +23,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
@ -50,7 +50,7 @@ namespace MWClass
virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const; virtual std::string getInventoryIcon (const MWWorld::ConstPtr& ptr) const;
///< Return name of inventory icon. ///< Return name of inventory icon.
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
const; const;
///< Generate action for using via inventory menu ///< Generate action for using via inventory menu

View file

@ -57,7 +57,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Armor::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
return defaultItemActivate(ptr, actor); return defaultItemActivate(ptr, actor);
@ -165,7 +165,7 @@ namespace MWClass
void Armor::registerSelf() void Armor::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Armor); std::shared_ptr<Class> instance (new Armor);
registerClass (typeid (ESM::Armor).name(), instance); registerClass (typeid (ESM::Armor).name(), instance);
} }
@ -354,9 +354,9 @@ namespace MWClass
return std::make_pair(1,""); return std::make_pair(1,"");
} }
boost::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const std::shared_ptr<MWWorld::Action> Armor::use (const MWWorld::Ptr& ptr) const
{ {
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
action->setSound(getUpSoundId(ptr)); action->setSound(getUpSoundId(ptr));

View file

@ -22,7 +22,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
@ -73,7 +73,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 ///< 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 /// Second item in the pair specifies the error message
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
const; const;
///< Generate action for using via inventory menu ///< Generate action for using via inventory menu

View file

@ -33,7 +33,7 @@ namespace MWClass
void BodyPart::registerSelf() void BodyPart::registerSelf()
{ {
boost::shared_ptr<MWWorld::Class> instance (new BodyPart); std::shared_ptr<MWWorld::Class> instance (new BodyPart);
registerClass (typeid (ESM::BodyPart).name(), instance); registerClass (typeid (ESM::BodyPart).name(), instance);
} }

View file

@ -54,7 +54,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Book::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Book::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
@ -62,13 +62,13 @@ namespace MWClass
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfItem"); const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfItem");
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
if(sound) action->setSound(sound->mId); if(sound) action->setSound(sound->mId);
return action; return action;
} }
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr)); return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
} }
std::string Book::getScript (const MWWorld::ConstPtr& ptr) const std::string Book::getScript (const MWWorld::ConstPtr& ptr) const
@ -87,7 +87,7 @@ namespace MWClass
void Book::registerSelf() void Book::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Book); std::shared_ptr<Class> instance (new Book);
registerClass (typeid (ESM::Book).name(), instance); registerClass (typeid (ESM::Book).name(), instance);
} }
@ -162,9 +162,9 @@ namespace MWClass
return record->mId; return record->mId;
} }
boost::shared_ptr<MWWorld::Action> Book::use (const MWWorld::Ptr& ptr) const std::shared_ptr<MWWorld::Action> Book::use (const MWWorld::Ptr& ptr) const
{ {
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr)); return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionRead(ptr));
} }
MWWorld::Ptr Book::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const MWWorld::Ptr Book::copyToCellImpl(const MWWorld::ConstPtr &ptr, MWWorld::CellStore &cell) const

View file

@ -20,7 +20,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
@ -53,7 +53,7 @@ namespace MWClass
virtual std::string applyEnchantment(const MWWorld::ConstPtr &ptr, const std::string& enchId, int enchCharge, const std::string& newName) const; virtual std::string applyEnchantment(const MWWorld::ConstPtr &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. ///< Creates a new record using \a ptr as template, with the given name and the given enchantment applied to it.
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const; virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) const;
///< Generate action for using via inventory menu ///< Generate action for using via inventory menu
virtual std::string getModel(const MWWorld::ConstPtr &ptr) const; virtual std::string getModel(const MWWorld::ConstPtr &ptr) const;

View file

@ -53,7 +53,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Clothing::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
return defaultItemActivate(ptr, actor); return defaultItemActivate(ptr, actor);
@ -124,7 +124,7 @@ namespace MWClass
void Clothing::registerSelf() void Clothing::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Clothing); std::shared_ptr<Class> instance (new Clothing);
registerClass (typeid (ESM::Clothing).name(), instance); registerClass (typeid (ESM::Clothing).name(), instance);
} }
@ -243,9 +243,9 @@ namespace MWClass
return std::make_pair (1, ""); return std::make_pair (1, "");
} }
boost::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const std::shared_ptr<MWWorld::Action> Clothing::use (const MWWorld::Ptr& ptr) const
{ {
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionEquip(ptr));
action->setSound(getUpSoundId(ptr)); action->setSound(getUpSoundId(ptr));

View file

@ -20,7 +20,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
@ -65,7 +65,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. ///< 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 /// Second item in the pair specifies the error message
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
const; const;
///< Generate action for using via inventory menu ///< Generate action for using via inventory menu

View file

@ -64,7 +64,7 @@ namespace MWClass
{ {
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
std::auto_ptr<ContainerCustomData> data (new ContainerCustomData); std::unique_ptr<ContainerCustomData> data (new ContainerCustomData);
MWWorld::LiveCellRef<ESM::Container> *ref = MWWorld::LiveCellRef<ESM::Container> *ref =
ptr.get<ESM::Container>(); ptr.get<ESM::Container>();
@ -130,18 +130,18 @@ namespace MWClass
return true; return true;
} }
boost::shared_ptr<MWWorld::Action> Container::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Container::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory)) if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
return boost::shared_ptr<MWWorld::Action> (new MWWorld::NullAction ()); return std::shared_ptr<MWWorld::Action> (new MWWorld::NullAction ());
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
{ {
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfContainer"); const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfContainer");
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
if(sound) action->setSound(sound->mId); if(sound) action->setSound(sound->mId);
return action; return action;
@ -222,20 +222,20 @@ namespace MWClass
{ {
if(!isTrapped) if(!isTrapped)
{ {
boost::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr)); std::shared_ptr<MWWorld::Action> action (new MWWorld::ActionOpen(ptr));
return action; return action;
} }
else else
{ {
// Activate trap // Activate trap
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
action->setSound(trapActivationSound); action->setSound(trapActivationSound);
return action; return action;
} }
} }
else else
{ {
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
action->setSound(lockedSound); action->setSound(lockedSound);
return action; return action;
} }
@ -265,7 +265,7 @@ namespace MWClass
void Container::registerSelf() void Container::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Container); std::shared_ptr<Class> instance (new Container);
registerClass (typeid (ESM::Container).name(), instance); registerClass (typeid (ESM::Container).name(), instance);
} }
@ -349,7 +349,7 @@ namespace MWClass
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
// Create a CustomData, but don't fill it from ESM records (not needed) // Create a CustomData, but don't fill it from ESM records (not needed)
std::auto_ptr<ContainerCustomData> data (new ContainerCustomData); std::unique_ptr<ContainerCustomData> data (new ContainerCustomData);
ptr.getRefData().setCustomData (data.release()); ptr.getRefData().setCustomData (data.release());
} }

View file

@ -23,7 +23,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation

View file

@ -123,7 +123,7 @@ namespace MWClass
{ {
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
std::auto_ptr<CreatureCustomData> data (new CreatureCustomData); std::unique_ptr<CreatureCustomData> data (new CreatureCustomData);
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>(); MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
@ -544,7 +544,7 @@ namespace MWClass
*/ */
} }
boost::shared_ptr<MWWorld::Action> Creature::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Creature::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf()) if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
@ -552,17 +552,17 @@ namespace MWClass
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfCreature"); const ESM::Sound *sound = store.get<ESM::Sound>().searchRandom("WolfCreature");
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}")); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction("#{sWerewolfRefusal}"));
if(sound) action->setSound(sound->mId); if(sound) action->setSound(sound->mId);
return action; return action;
} }
if(getCreatureStats(ptr).isDead()) if(getCreatureStats(ptr).isDead())
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true)); return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat()) if(ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
return boost::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction("")); return std::shared_ptr<MWWorld::Action>(new MWWorld::FailedAction(""));
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr)); return std::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
} }
MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const MWWorld::ContainerStore& Creature::getContainerStore (const MWWorld::Ptr& ptr) const
@ -599,7 +599,7 @@ namespace MWClass
void Creature::registerSelf() void Creature::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Creature); std::shared_ptr<Class> instance (new Creature);
registerClass (typeid (ESM::Creature).name(), instance); registerClass (typeid (ESM::Creature).name(), instance);
} }
@ -852,7 +852,7 @@ namespace MWClass
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
// Create a CustomData, but don't fill it from ESM records (not needed) // Create a CustomData, but don't fill it from ESM records (not needed)
std::auto_ptr<CreatureCustomData> data (new CreatureCustomData); std::unique_ptr<CreatureCustomData> data (new CreatureCustomData);
if (hasInventoryStore(ptr)) if (hasInventoryStore(ptr))
data->mContainerStore = new MWWorld::InventoryStore(); data->mContainerStore = new MWWorld::InventoryStore();

View file

@ -60,7 +60,7 @@ namespace MWClass
virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const; virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, const osg::Vec3f &hitPosition, bool successful) const;
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation

View file

@ -70,7 +70,7 @@ namespace MWClass
void CreatureLevList::registerSelf() void CreatureLevList::registerSelf()
{ {
boost::shared_ptr<Class> instance (new CreatureLevList); std::shared_ptr<Class> instance (new CreatureLevList);
registerClass (typeid (ESM::CreatureLevList).name(), instance); registerClass (typeid (ESM::CreatureLevList).name(), instance);
} }
@ -141,7 +141,7 @@ namespace MWClass
{ {
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
std::auto_ptr<CreatureLevListCustomData> data (new CreatureLevListCustomData); std::unique_ptr<CreatureLevListCustomData> data (new CreatureLevListCustomData);
data->mSpawnActorId = -1; data->mSpawnActorId = -1;
data->mSpawn = true; data->mSpawn = true;

View file

@ -111,7 +111,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Door::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>(); MWWorld::LiveCellRef<ESM::Door> *ref = ptr.get<ESM::Door>();
@ -144,6 +144,8 @@ namespace MWClass
// make key id lowercase // make key id lowercase
std::string keyId = ptr.getCellRef().getKey(); std::string keyId = ptr.getCellRef().getKey();
if (!keyId.empty())
{
Misc::StringUtils::lowerCaseInPlace(keyId); Misc::StringUtils::lowerCaseInPlace(keyId);
for (MWWorld::ConstContainerStoreIterator it = invStore.cbegin(); it != invStore.cend(); ++it) for (MWWorld::ConstContainerStoreIterator it = invStore.cbegin(); it != invStore.cend(); ++it)
{ {
@ -153,6 +155,8 @@ namespace MWClass
{ {
hasKey = true; hasKey = true;
keyName = it->getClass().getName(*it); keyName = it->getClass().getName(*it);
break;
}
} }
} }
@ -207,7 +211,7 @@ namespace MWClass
if(isTrapped) if(isTrapped)
{ {
// Trap activation // Trap activation
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
action->setSound(trapActivationSound); action->setSound(trapActivationSound);
return action; return action;
} }
@ -217,12 +221,12 @@ namespace MWClass
if (actor == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getDistanceToFacedObject() > MWBase::Environment::get().getWorld()->getMaxActivationDistance()) if (actor == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getDistanceToFacedObject() > MWBase::Environment::get().getWorld()->getMaxActivationDistance())
{ {
// player activated teleport door with telekinesis // player activated teleport door with telekinesis
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
return action; return action;
} }
else else
{ {
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTeleport (ptr.getCellRef().getDestCell(), ptr.getCellRef().getDoorDest(), true));
action->setSound(openSound); action->setSound(openSound);
return action; return action;
} }
@ -230,7 +234,7 @@ namespace MWClass
else else
{ {
// animated door // animated door
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionDoor(ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::ActionDoor(ptr));
int doorstate = getDoorState(ptr); int doorstate = getDoorState(ptr);
bool opening = true; bool opening = true;
float doorRot = ptr.getRefData().getPosition().rot[2] - ptr.getCellRef().getPosition().rot[2]; float doorRot = ptr.getRefData().getPosition().rot[2] - ptr.getCellRef().getPosition().rot[2];
@ -264,7 +268,7 @@ namespace MWClass
else else
{ {
// locked, and we can't open. // locked, and we can't open.
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr)); std::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
action->setSound(lockedSound); action->setSound(lockedSound);
return action; return action;
} }
@ -305,7 +309,7 @@ namespace MWClass
void Door::registerSelf() void Door::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Door); std::shared_ptr<Class> instance (new Door);
registerClass (typeid (ESM::Door).name(), instance); registerClass (typeid (ESM::Door).name(), instance);
} }
@ -391,7 +395,7 @@ namespace MWClass
{ {
if (!ptr.getRefData().getCustomData()) if (!ptr.getRefData().getCustomData())
{ {
std::auto_ptr<DoorCustomData> data(new DoorCustomData); std::unique_ptr<DoorCustomData> data(new DoorCustomData);
data->mDoorState = 0; data->mDoorState = 0;
ptr.getRefData().setCustomData(data.release()); ptr.getRefData().setCustomData(data.release());

View file

@ -26,7 +26,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation

View file

@ -54,7 +54,7 @@ namespace MWClass
return ref->mBase->mName; return ref->mBase->mName;
} }
boost::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr, std::shared_ptr<MWWorld::Action> Ingredient::activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const const MWWorld::Ptr& actor) const
{ {
return defaultItemActivate(ptr, actor); return defaultItemActivate(ptr, actor);
@ -75,9 +75,9 @@ namespace MWClass
} }
boost::shared_ptr<MWWorld::Action> Ingredient::use (const MWWorld::Ptr& ptr) const std::shared_ptr<MWWorld::Action> Ingredient::use (const MWWorld::Ptr& ptr) const
{ {
boost::shared_ptr<MWWorld::Action> action (new MWWorld::ActionEat (ptr)); std::shared_ptr<MWWorld::Action> action (new MWWorld::ActionEat (ptr));
action->setSound ("Swallow"); action->setSound ("Swallow");
@ -86,7 +86,7 @@ namespace MWClass
void Ingredient::registerSelf() void Ingredient::registerSelf()
{ {
boost::shared_ptr<Class> instance (new Ingredient); std::shared_ptr<Class> instance (new Ingredient);
registerClass (typeid (ESM::Ingredient).name(), instance); registerClass (typeid (ESM::Ingredient).name(), instance);
} }

View file

@ -20,7 +20,7 @@ namespace MWClass
///< \return name (the one that is to be presented to the user; not the internal one); ///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string. /// can return an empty string.
virtual boost::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr, virtual std::shared_ptr<MWWorld::Action> activate (const MWWorld::Ptr& ptr,
const MWWorld::Ptr& actor) const; const MWWorld::Ptr& actor) const;
///< Generate action for activation ///< Generate action for activation
@ -36,7 +36,7 @@ namespace MWClass
virtual int getValue (const MWWorld::ConstPtr& ptr) const; virtual int getValue (const MWWorld::ConstPtr& ptr) const;
///< Return trade value of the object. Throws an exception, if the object can't be traded. ///< Return trade value of the object. Throws an exception, if the object can't be traded.
virtual boost::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr) virtual std::shared_ptr<MWWorld::Action> use (const MWWorld::Ptr& ptr)
const; const;
///< Generate action for using via inventory menu ///< Generate action for using via inventory menu

Some files were not shown because too many files have changed in this diff Show more