mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
replaced NULL with nullptr
This commit is contained in:
parent
3c76764ef4
commit
91d1bab4ac
188 changed files with 682 additions and 682 deletions
|
@ -21,7 +21,7 @@
|
|||
CS::Editor::Editor ()
|
||||
: mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr),
|
||||
mViewManager (mDocumentManager), mPid(""),
|
||||
mLock(), mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL)
|
||||
mLock(), mIpcServerName ("org.openmw.OpenCS"), mServer(nullptr), mClientSocket(nullptr)
|
||||
{
|
||||
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
|
||||
|
||||
|
@ -332,7 +332,7 @@ bool CS::Editor::makeIPCServer()
|
|||
}
|
||||
|
||||
mServer->close();
|
||||
mServer = NULL;
|
||||
mServer = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "document.hpp"
|
||||
|
||||
CSMDoc::DocumentManager::DocumentManager (const Files::ConfigurationManager& configuration)
|
||||
: mConfiguration (configuration), mEncoding (ToUTF8::WINDOWS_1252), mVFS(NULL)
|
||||
: mConfiguration (configuration), mEncoding (ToUTF8::WINDOWS_1252), mVFS(nullptr)
|
||||
{
|
||||
boost::filesystem::path projectPath = configuration.getUserDataPath() / "projects";
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ CSMSettings::UserSettings *CSMSettings::UserSettings::sUserSettingsInstance = 0;
|
|||
|
||||
CSMSettings::UserSettings::UserSettings (const Files::ConfigurationManager& configurationManager)
|
||||
: mCfgMgr (configurationManager)
|
||||
, mSettingDefinitions(NULL)
|
||||
, mSettingDefinitions(nullptr)
|
||||
{
|
||||
assert(!sUserSettingsInstance);
|
||||
sUserSettingsInstance = this;
|
||||
|
|
|
@ -62,7 +62,7 @@ void CSMWorld::CreateCommand::applyModifications()
|
|||
if (!mNestedValues.empty())
|
||||
{
|
||||
CSMWorld::IdTree *tree = dynamic_cast<CSMWorld::IdTree *>(&mModel);
|
||||
if (tree == NULL)
|
||||
if (tree == nullptr)
|
||||
{
|
||||
throw std::logic_error("CSMWorld::CreateCommand: Attempt to add nested values to the non-nested model");
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ void CSMWorld::IdCompletionManager::generateCompleters(CSMWorld::Data &data)
|
|||
{
|
||||
QAbstractItemModel *model = data.getTableModel(current->second);
|
||||
CSMWorld::IdTableBase *table = dynamic_cast<CSMWorld::IdTableBase *>(model);
|
||||
if (table != NULL)
|
||||
if (table != nullptr)
|
||||
{
|
||||
int idColumn = table->searchColumnIndex(CSMWorld::Columns::ColumnId_Id);
|
||||
if (idColumn != -1)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace
|
|||
CSMWorld::InfoTableProxyModel::InfoTableProxyModel(CSMWorld::UniversalId::Type type, QObject *parent)
|
||||
: IdTableProxyModel(parent),
|
||||
mType(type),
|
||||
mSourceModel(NULL),
|
||||
mSourceModel(nullptr),
|
||||
mInfoColumnId(type == UniversalId::Type_TopicInfos ? Columns::ColumnId_Topic :
|
||||
Columns::ColumnId_Journal)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
|
|||
{
|
||||
IdTableProxyModel::setSourceModel(sourceModel);
|
||||
mSourceModel = dynamic_cast<IdTableBase *>(sourceModel);
|
||||
if (mSourceModel != NULL)
|
||||
if (mSourceModel != nullptr)
|
||||
{
|
||||
connect(mSourceModel,
|
||||
SIGNAL(rowsInserted(const QModelIndex &, int, int)),
|
||||
|
|
|
@ -295,13 +295,13 @@ void CSMWorld::ContainerRefIdAdapter::setData (const RefIdColumn *column, RefIdD
|
|||
|
||||
CSMWorld::CreatureColumns::CreatureColumns (const ActorColumns& actorColumns)
|
||||
: ActorColumns (actorColumns),
|
||||
mType(NULL),
|
||||
mSoul(NULL),
|
||||
mScale(NULL),
|
||||
mOriginal(NULL),
|
||||
mCombat(NULL),
|
||||
mMagic(NULL),
|
||||
mStealth(NULL)
|
||||
mType(nullptr),
|
||||
mSoul(nullptr),
|
||||
mScale(nullptr),
|
||||
mOriginal(nullptr),
|
||||
mCombat(nullptr),
|
||||
mMagic(nullptr),
|
||||
mStealth(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
|
||||
|
@ -543,14 +543,14 @@ void CSMWorld::MiscRefIdAdapter::setData (const RefIdColumn *column, RefIdData&
|
|||
|
||||
CSMWorld::NpcColumns::NpcColumns (const ActorColumns& actorColumns)
|
||||
: ActorColumns (actorColumns),
|
||||
mRace(NULL),
|
||||
mClass(NULL),
|
||||
mFaction(NULL),
|
||||
mHair(NULL),
|
||||
mHead(NULL),
|
||||
mAttributes(NULL),
|
||||
mSkills(NULL),
|
||||
mMisc(NULL)
|
||||
mRace(nullptr),
|
||||
mClass(nullptr),
|
||||
mFaction(nullptr),
|
||||
mHair(nullptr),
|
||||
mHead(nullptr),
|
||||
mAttributes(nullptr),
|
||||
mSkills(nullptr),
|
||||
mMisc(nullptr)
|
||||
{}
|
||||
|
||||
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdexcept>
|
||||
|
||||
CSMWorld::ResourcesManager::ResourcesManager()
|
||||
: mVFS(NULL)
|
||||
: mVFS(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ void CSVDoc::FileDialog::slotRejected()
|
|||
if(mFileWidget)
|
||||
{
|
||||
delete mFileWidget;
|
||||
mFileWidget = NULL;
|
||||
mFileWidget = nullptr;
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void CSVDoc::FileDialog::slotNewFile()
|
|||
if(mFileWidget)
|
||||
{
|
||||
delete mFileWidget;
|
||||
mFileWidget = NULL;
|
||||
mFileWidget = nullptr;
|
||||
}
|
||||
disconnect (ui.projectButtonBox, SIGNAL (accepted()), this, SLOT (slotNewFile()));
|
||||
close();
|
||||
|
|
|
@ -536,7 +536,7 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
|||
return;
|
||||
}
|
||||
|
||||
SubView *view = NULL;
|
||||
SubView *view = nullptr;
|
||||
if(isReferenceable)
|
||||
{
|
||||
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||
|
|
|
@ -71,7 +71,7 @@ CSVRender::Cell::Cell (CSMWorld::Data& data, osg::Group* rootNode, const std::st
|
|||
const ESM::Land* esmLand = land.getRecord(mId).get().mLand.get();
|
||||
if(esmLand && esmLand->mDataTypes&ESM::Land::DATA_VHGT)
|
||||
{
|
||||
mTerrain.reset(new Terrain::TerrainGrid(mCellNode, data.getResourceSystem(), NULL, new TerrainStorage(mData), Element_Terrain<<1));
|
||||
mTerrain.reset(new Terrain::TerrainGrid(mCellNode, data.getResourceSystem(), nullptr, new TerrainStorage(mData), Element_Terrain<<1));
|
||||
mTerrain->loadCell(esmLand->mX,
|
||||
esmLand->mY);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction()
|
|||
|
||||
CSVRender::PagedWorldspaceWidget::PagedWorldspaceWidget (QWidget* parent, CSMDoc::Document& document)
|
||||
: WorldspaceWidget (document, parent), mDocument (document), mWorldspace ("std::default"),
|
||||
mControlElements(NULL), mDisplayCellCoord(true)
|
||||
mControlElements(nullptr), mDisplayCellCoord(true)
|
||||
{
|
||||
QAbstractItemModel *cells =
|
||||
document.getData().getTableModel (CSMWorld::UniversalId::Type_Cells);
|
||||
|
|
|
@ -135,7 +135,7 @@ void CompositeViewer::update()
|
|||
SceneWidget::SceneWidget(Resource::SceneManager* sceneManager, QWidget *parent, Qt::WindowFlags f)
|
||||
: RenderWidget(parent, f)
|
||||
, mSceneManager(sceneManager)
|
||||
, mLighting(NULL)
|
||||
, mLighting(nullptr)
|
||||
, mHasDefaultAmbient(false)
|
||||
{
|
||||
// we handle lighting manually
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace CSVRender
|
|||
// has to wrap the vertices of the last row and column to the next cell, which may be a nonexisting cell
|
||||
int index = mData.getLand().searchId(stream.str());
|
||||
if (index == -1)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
ESM::Land* land = mData.getLand().getRecord(index).get().mLand.get();
|
||||
int mask = ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "view.hpp"
|
||||
|
||||
CSVSettings::SettingWindow::SettingWindow(QWidget *parent)
|
||||
: QMainWindow(parent), mModel(NULL)
|
||||
: QMainWindow(parent), mModel(nullptr)
|
||||
{}
|
||||
|
||||
void CSVSettings::SettingWindow::createPages()
|
||||
|
|
|
@ -46,7 +46,7 @@ void CSVWidget::ColorPickerPopup::showPicker(const QPoint &position, const QColo
|
|||
void CSVWidget::ColorPickerPopup::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
QPushButton *button = qobject_cast<QPushButton *>(parentWidget());
|
||||
if (button != NULL)
|
||||
if (button != nullptr)
|
||||
{
|
||||
QStyleOptionButton option;
|
||||
option.init(button);
|
||||
|
|
|
@ -11,7 +11,7 @@ CSVWidget::CompleterPopup::CompleterPopup(QWidget *parent)
|
|||
|
||||
int CSVWidget::CompleterPopup::sizeHintForRow(int row) const
|
||||
{
|
||||
if (model() == NULL)
|
||||
if (model() == nullptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ std::string CSVWorld::CellCreator::getId() const
|
|||
void CSVWorld::CellCreator::configureCreateCommand(CSMWorld::CreateCommand& command) const
|
||||
{
|
||||
CSMWorld::IdTree *model = dynamic_cast<CSMWorld::IdTree *>(getData().getTableModel(getCollectionId()));
|
||||
Q_ASSERT(model != NULL);
|
||||
Q_ASSERT(model != nullptr);
|
||||
int parentIndex = model->findColumnIndex(CSMWorld::Columns::ColumnId_Cell);
|
||||
int index = model->findNestedColumnIndex(parentIndex, CSMWorld::Columns::ColumnId_Interior);
|
||||
command.addNestedValue(parentIndex, index, mType->currentIndex() == 0);
|
||||
|
|
|
@ -154,7 +154,7 @@ mNotEditableDelegate(table, parent)
|
|||
|
||||
CSVWorld::CommandDelegate* CSVWorld::DialogueDelegateDispatcher::makeDelegate(CSMWorld::ColumnBase::Display display)
|
||||
{
|
||||
CommandDelegate *delegate = NULL;
|
||||
CommandDelegate *delegate = nullptr;
|
||||
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
|
||||
if (delegateIt == mDelegates.end())
|
||||
{
|
||||
|
@ -247,11 +247,11 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
|
|||
variant = index.data(Qt::DisplayRole);
|
||||
if (!variant.isValid())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* editor = NULL;
|
||||
QWidget* editor = nullptr;
|
||||
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
||||
{
|
||||
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent),
|
||||
|
@ -321,7 +321,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
|||
mWidget(widget),
|
||||
mIdType(CSMWorld::TableMimeData::convertEnums(display))
|
||||
{
|
||||
Q_ASSERT(mWidget != NULL);
|
||||
Q_ASSERT(mWidget != nullptr);
|
||||
Q_ASSERT(CSMWorld::ColumnBase::isId(display));
|
||||
Q_ASSERT(mIdType != CSMWorld::UniversalId::Type_None);
|
||||
|
||||
|
@ -335,7 +335,7 @@ CSVWorld::IdContextMenu::IdContextMenu(QWidget *widget, CSMWorld::ColumnBase::Di
|
|||
connect(mEditIdAction, SIGNAL(triggered()), this, SLOT(editIdRequest()));
|
||||
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(mWidget);
|
||||
if (lineEdit != NULL)
|
||||
if (lineEdit != nullptr)
|
||||
{
|
||||
mContextMenu = lineEdit->createStandardContextMenu();
|
||||
}
|
||||
|
@ -356,11 +356,11 @@ QString CSVWorld::IdContextMenu::getWidgetValue() const
|
|||
QLabel *label = qobject_cast<QLabel *>(mWidget);
|
||||
|
||||
QString value = "";
|
||||
if (lineEdit != NULL)
|
||||
if (lineEdit != nullptr)
|
||||
{
|
||||
value = lineEdit->text();
|
||||
}
|
||||
else if (label != NULL)
|
||||
else if (label != nullptr)
|
||||
{
|
||||
value = label->text();
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ void CSVWorld::EditWidget::createEditorContextMenu(QWidget *editor,
|
|||
CSMWorld::ColumnBase::Display display,
|
||||
int currentRow) const
|
||||
{
|
||||
Q_ASSERT(editor != NULL);
|
||||
Q_ASSERT(editor != nullptr);
|
||||
|
||||
if (CSMWorld::ColumnBase::isId(display) &&
|
||||
CSMWorld::TableMimeData::convertEnums(display) != CSMWorld::UniversalId::Type_None)
|
||||
|
@ -466,11 +466,11 @@ CSVWorld::EditWidget::EditWidget(QWidget *parent,
|
|||
int row, CSMWorld::IdTable* table, CSMWorld::CommandDispatcher& commandDispatcher,
|
||||
CSMDoc::Document& document, bool createAndDelete) :
|
||||
QScrollArea(parent),
|
||||
mWidgetMapper(NULL),
|
||||
mNestedTableMapper(NULL),
|
||||
mDispatcher(NULL),
|
||||
mNestedTableDispatcher(NULL),
|
||||
mMainWidget(NULL),
|
||||
mWidgetMapper(nullptr),
|
||||
mNestedTableMapper(nullptr),
|
||||
mDispatcher(nullptr),
|
||||
mNestedTableDispatcher(nullptr),
|
||||
mMainWidget(nullptr),
|
||||
mTable(table),
|
||||
mCommandDispatcher (commandDispatcher),
|
||||
mDocument (document)
|
||||
|
@ -725,7 +725,7 @@ bool CSVWorld::SimpleDialogueSubView::isLocked() const
|
|||
CSVWorld::SimpleDialogueSubView::SimpleDialogueSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) :
|
||||
SubView (id),
|
||||
mEditWidget(0),
|
||||
mMainLayout(NULL),
|
||||
mMainLayout(nullptr),
|
||||
mTable(dynamic_cast<CSMWorld::IdTable*>(document.getData().getTableModel(id))),
|
||||
mLocked(false),
|
||||
mDocument(document),
|
||||
|
|
|
@ -12,7 +12,7 @@ const CSMWorld::TableMimeData *CSVWorld::DragDropUtils::getTableMimeData(const Q
|
|||
bool CSVWorld::DragDropUtils::canAcceptData(const QDropEvent &event, CSMWorld::ColumnBase::Display type)
|
||||
{
|
||||
const CSMWorld::TableMimeData *data = getTableMimeData(event);
|
||||
return data != NULL && data->holdsType(type);
|
||||
return data != nullptr && data->holdsType(type);
|
||||
}
|
||||
|
||||
CSMWorld::UniversalId CSVWorld::DragDropUtils::getAcceptedData(const QDropEvent &event,
|
||||
|
|
|
@ -83,7 +83,7 @@ void CSVWorld::DragRecordTable::dropEvent(QDropEvent *event)
|
|||
|
||||
CSMWorld::ColumnBase::Display CSVWorld::DragRecordTable::getIndexDisplayType(const QModelIndex &index) const
|
||||
{
|
||||
Q_ASSERT(model() != NULL);
|
||||
Q_ASSERT(model() != nullptr);
|
||||
|
||||
if (index.isValid())
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace CSVWorld
|
|||
bool mEditLock;
|
||||
|
||||
public:
|
||||
DragRecordTable(CSMDoc::Document& document, QWidget* parent = NULL);
|
||||
DragRecordTable(CSMDoc::Document& document, QWidget* parent = nullptr);
|
||||
|
||||
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const = 0;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ QWidget *CSVWorld::IdCompletionDelegate::createEditor(QWidget *parent,
|
|||
{
|
||||
if (!index.data(Qt::EditRole).isValid() && !index.data(Qt::DisplayRole).isValid())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CSMWorld::IdCompletionManager &completionManager = getDocument().getIdCompletionManager();
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace CSVWorld
|
|||
NestedTable(CSMDoc::Document& document,
|
||||
CSMWorld::UniversalId id,
|
||||
CSMWorld::NestedTableProxyModel* model,
|
||||
QWidget* parent = NULL);
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
virtual std::vector<CSMWorld::UniversalId> getDraggedRecords() const;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "creator.hpp"
|
||||
|
||||
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
|
||||
: SubView (id), mScene(NULL), mLayout(new QHBoxLayout), mDocument(document), mToolbar(NULL)
|
||||
: SubView (id), mScene(nullptr), mLayout(new QHBoxLayout), mDocument(document), mToolbar(nullptr)
|
||||
{
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
|
||||
|
@ -37,7 +37,7 @@ CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
|||
|
||||
mLayout->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||
|
||||
CSVRender::WorldspaceWidget* worldspaceWidget = NULL;
|
||||
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
||||
widgetType whatWidget;
|
||||
|
||||
if (id.getId()=="sys::default")
|
||||
|
@ -197,9 +197,9 @@ void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::CellSelection
|
|||
|
||||
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& data)
|
||||
{
|
||||
CSVRender::PagedWorldspaceWidget* pagedNewWidget = NULL;
|
||||
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = NULL;
|
||||
CSVWidget::SceneToolbar* toolbar = NULL;
|
||||
CSVRender::PagedWorldspaceWidget* pagedNewWidget = nullptr;
|
||||
CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = nullptr;
|
||||
CSVWidget::SceneToolbar* toolbar = nullptr;
|
||||
|
||||
CSVRender::WorldspaceWidget::DropType type = CSVRender::WorldspaceWidget::getDropType (data);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
|||
QVariant new_;
|
||||
// Color columns use a custom editor, so we need explicitly extract a data from it
|
||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||
if (colorEditor != NULL)
|
||||
if (colorEditor != nullptr)
|
||||
{
|
||||
new_ = colorEditor->color();
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelInde
|
|||
|
||||
// Color columns use a custom editor, so we need explicitly set a data for it
|
||||
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
|
||||
if (colorEditor != NULL)
|
||||
if (colorEditor != nullptr)
|
||||
{
|
||||
colorEditor->setColor(index.data().value<QColor>());
|
||||
return;
|
||||
|
|
|
@ -63,7 +63,7 @@ static const struct {
|
|||
{ "Illegal instruction", SIGILL },
|
||||
{ "FPU exception", SIGFPE },
|
||||
{ "System BUS error", SIGBUS },
|
||||
{ NULL, 0 }
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -80,7 +80,7 @@ static const struct {
|
|||
{ ILL_COPROC, "Coprocessor error" },
|
||||
{ ILL_BADSTK, "Internal stack error" },
|
||||
#endif
|
||||
{ 0, NULL }
|
||||
{ 0, nullptr }
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -95,7 +95,7 @@ static const struct {
|
|||
{ FPE_FLTRES, "Floating point inexact result" },
|
||||
{ FPE_FLTINV, "Floating point invalid operation" },
|
||||
{ FPE_FLTSUB, "Subscript out of range" },
|
||||
{ 0, NULL }
|
||||
{ 0, nullptr }
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -106,7 +106,7 @@ static const struct {
|
|||
{ SEGV_MAPERR, "Address not mapped to object" },
|
||||
{ SEGV_ACCERR, "Invalid permissions for mapped object" },
|
||||
#endif
|
||||
{ 0, NULL }
|
||||
{ 0, nullptr }
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -118,7 +118,7 @@ static const struct {
|
|||
{ BUS_ADRERR, "Non-existent physical address" },
|
||||
{ BUS_OBJERR, "Object specific hardware error" },
|
||||
#endif
|
||||
{ 0, NULL }
|
||||
{ 0, nullptr }
|
||||
};
|
||||
|
||||
static int (*cc_user_info)(char*, char*);
|
||||
|
@ -132,7 +132,7 @@ static void gdb_info(pid_t pid)
|
|||
|
||||
/* Create a temp file to put gdb commands into */
|
||||
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
|
||||
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != NULL)
|
||||
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
|
||||
{
|
||||
fprintf(f, "attach %d\n"
|
||||
"shell echo \"\"\n"
|
||||
|
@ -255,7 +255,7 @@ static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
|||
close(fd[0]);
|
||||
close(fd[1]);
|
||||
|
||||
execl(argv0, argv0, crash_switch, NULL);
|
||||
execl(argv0, argv0, crash_switch, nullptr);
|
||||
|
||||
safe_write(STDERR_FILENO, exec_err, sizeof(exec_err)-1);
|
||||
_exit(1);
|
||||
|
@ -390,7 +390,7 @@ static void crash_handler(const char *logfile)
|
|||
if(logfile)
|
||||
{
|
||||
std::string message = "OpenMW has encountered a fatal error.\nCrash log saved to '" + std::string(logfile) + "'.\n Please report this to https://bugs.openmw.org !";
|
||||
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL);
|
||||
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), nullptr);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ int cc_install_handlers(int argc, char **argv, int num_signals, int *signals, co
|
|||
altss.ss_sp = altstack;
|
||||
altss.ss_flags = 0;
|
||||
altss.ss_size = sizeof(altstack);
|
||||
sigaltstack(&altss, NULL);
|
||||
sigaltstack(&altss, nullptr);
|
||||
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sa_sigaction = crash_catcher;
|
||||
|
@ -437,7 +437,7 @@ int cc_install_handlers(int argc, char **argv, int num_signals, int *signals, co
|
|||
while(num_signals--)
|
||||
{
|
||||
if((*signals != SIGSEGV && *signals != SIGILL && *signals != SIGFPE && *signals != SIGABRT &&
|
||||
*signals != SIGBUS) || sigaction(*signals, &sa, NULL) == -1)
|
||||
*signals != SIGBUS) || sigaction(*signals, &sa, nullptr) == -1)
|
||||
{
|
||||
*signals = 0;
|
||||
retval = -1;
|
||||
|
|
|
@ -193,9 +193,9 @@ void OMW::Engine::frame(float frametime)
|
|||
}
|
||||
|
||||
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
||||
: mWindow(NULL)
|
||||
: mWindow(nullptr)
|
||||
, mEncoding(ToUTF8::WINDOWS_1252)
|
||||
, mEncoder(NULL)
|
||||
, mEncoder(nullptr)
|
||||
, mVerboseScripts (false)
|
||||
, mSkipMenu (false)
|
||||
, mUseSound (true)
|
||||
|
@ -233,16 +233,16 @@ OMW::Engine::~Engine()
|
|||
mEnvironment.cleanup();
|
||||
|
||||
delete mScriptContext;
|
||||
mScriptContext = NULL;
|
||||
mScriptContext = nullptr;
|
||||
|
||||
mResourceSystem.reset();
|
||||
|
||||
mViewer = NULL;
|
||||
mViewer = nullptr;
|
||||
|
||||
if (mWindow)
|
||||
{
|
||||
SDL_DestroyWindow(mWindow);
|
||||
mWindow = NULL;
|
||||
mWindow = nullptr;
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
|
|
|
@ -368,7 +368,7 @@ int main(int argc, char**argv)
|
|||
if ((argc == 2 && strcmp(argv[1], "--cc-handle-crash") == 0) || !is_debugger_attached())
|
||||
{
|
||||
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
||||
cc_install_handlers(argc, argv, 5, s, (cfgMgr.getLogPath() / "crash.log").string().c_str(), NULL);
|
||||
cc_install_handlers(argc, argv, 5, s, (cfgMgr.getLogPath() / "crash.log").string().c_str(), nullptr);
|
||||
std::cout << "Installing crash catcher" << std::endl;
|
||||
}
|
||||
else
|
||||
|
@ -393,7 +393,7 @@ int main(int argc, char**argv)
|
|||
#if (defined(__APPLE__) || defined(__linux) || defined(__unix) || defined(__posix))
|
||||
if (!isatty(fileno(stdin)))
|
||||
#endif
|
||||
SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), NULL);
|
||||
SDL_ShowSimpleMessageBox(0, "OpenMW: Fatal error", e.what(), nullptr);
|
||||
|
||||
std::cerr << "\nERROR: " << e.what() << std::endl;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Activator> *ref =
|
||||
ptr.get<ESM::Activator>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Apparatus> *ref =
|
||||
ptr.get<ESM::Apparatus>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Armor> *ref =
|
||||
ptr.get<ESM::Armor>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Book> *ref =
|
||||
ptr.get<ESM::Book>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Clothing> *ref =
|
||||
ptr.get<ESM::Clothing>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace MWClass
|
|||
ptr.get<ESM::Container>();
|
||||
if (ref->mBase->mFlags & ESM::Container::Respawn)
|
||||
{
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Container> *ref =
|
||||
ptr.get<ESM::Container>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -184,7 +184,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref =
|
||||
ptr.get<ESM::Creature>();
|
||||
assert (ref->mBase != NULL);
|
||||
assert (ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
@ -280,7 +280,7 @@ namespace MWClass
|
|||
bool healthdmg = true;
|
||||
if (!weapon.isEmpty())
|
||||
{
|
||||
const unsigned char *attack = NULL;
|
||||
const unsigned char *attack = nullptr;
|
||||
if(type == ESM::Weapon::AT_Chop)
|
||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||
else if(type == ESM::Weapon::AT_Slash)
|
||||
|
@ -862,7 +862,7 @@ namespace MWClass
|
|||
// Reset to original position
|
||||
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
||||
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Door> *ref =
|
||||
ptr.get<ESM::Door>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Ingredient> *ref =
|
||||
ptr.get<ESM::Ingredient>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
assert (ref->mBase != NULL);
|
||||
assert (ref->mBase != nullptr);
|
||||
|
||||
// TODO: add option somewhere to enable collision for placeable objects
|
||||
if (!model.empty() && (ref->mBase->mData.mFlags & ESM::Light::Carry) == 0)
|
||||
|
@ -63,7 +63,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Light> *ref =
|
||||
ptr.get<ESM::Light>();
|
||||
assert (ref->mBase != NULL);
|
||||
assert (ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Lockpick> *ref =
|
||||
ptr.get<ESM::Lockpick>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||
ptr.get<ESM::Miscellaneous>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -430,7 +430,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::NPC> *ref =
|
||||
ptr.get<ESM::NPC>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
std::string model = "meshes\\base_anim.nif";
|
||||
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(ref->mBase->mRace);
|
||||
|
@ -524,7 +524,7 @@ namespace MWClass
|
|||
float damage = 0.0f;
|
||||
if(!weapon.isEmpty())
|
||||
{
|
||||
const unsigned char *attack = NULL;
|
||||
const unsigned char *attack = nullptr;
|
||||
if(type == ESM::Weapon::AT_Chop)
|
||||
attack = weapon.get<ESM::Weapon>()->mBase->mData.mChop;
|
||||
else if(type == ESM::Weapon::AT_Slash)
|
||||
|
@ -1300,7 +1300,7 @@ namespace MWClass
|
|||
// Reset to original position
|
||||
ptr.getRefData().setPosition(ptr.getCellRef().getPosition());
|
||||
|
||||
ptr.getRefData().setCustomData(NULL);
|
||||
ptr.getRefData().setCustomData(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Potion> *ref =
|
||||
ptr.get<ESM::Potion>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Probe> *ref =
|
||||
ptr.get<ESM::Probe>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Repair> *ref =
|
||||
ptr.get<ESM::Repair>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Static> *ref =
|
||||
ptr.get<ESM::Static>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWClass
|
|||
{
|
||||
MWWorld::LiveCellRef<ESM::Weapon> *ref =
|
||||
ptr.get<ESM::Weapon>();
|
||||
assert(ref->mBase != NULL);
|
||||
assert(ref->mBase != nullptr);
|
||||
|
||||
const std::string &model = ref->mBase->mModel;
|
||||
if (!model.empty()) {
|
||||
|
|
|
@ -622,7 +622,7 @@ namespace MWDialogue
|
|||
|
||||
Filter filter(actor, 0, false);
|
||||
const ESM::DialInfo *info = filter.search(*dial, false);
|
||||
if(info != NULL)
|
||||
if(info != nullptr)
|
||||
{
|
||||
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
||||
if(winMgr->getSubtitlesEnabled())
|
||||
|
|
|
@ -596,7 +596,7 @@ const ESM::DialInfo* MWDialogue::Filter::search (const ESM::Dialogue& dialogue,
|
|||
std::vector<const ESM::DialInfo *> suitableInfos = list (dialogue, fallbackToInfoRefusal, false);
|
||||
|
||||
if (suitableInfos.empty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
else
|
||||
return suitableInfos[0];
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace MWDialogue
|
|||
{
|
||||
if (actor.isEmpty())
|
||||
{
|
||||
MWScript::InterpreterContext interpreterContext(NULL,MWWorld::Ptr());
|
||||
MWScript::InterpreterContext interpreterContext(nullptr,MWWorld::Ptr());
|
||||
mText = Interpreter::fixDefinesDialog(iter->mResponse, interpreterContext);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
|||
{
|
||||
AlchemyWindow::AlchemyWindow()
|
||||
: WindowBase("openmw_alchemy_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mAlchemy(new MWMechanics::Alchemy())
|
||||
, mApparatus (4)
|
||||
, mIngredients (4)
|
||||
|
|
|
@ -10,7 +10,7 @@ void BackgroundImage::setBackgroundImage (const std::string& image, bool fixedRa
|
|||
if (mChild)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mChild);
|
||||
mChild = NULL;
|
||||
mChild = nullptr;
|
||||
}
|
||||
if (!stretch)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
MYGUI_RTTI_DERIVED(BackgroundImage)
|
||||
|
||||
public:
|
||||
BackgroundImage() : mChild(NULL), mAspect(0) {}
|
||||
BackgroundImage() : mChild(nullptr), mAspect(0) {}
|
||||
|
||||
/**
|
||||
* @param fixedRatio Use a fixed ratio of 4:3, regardless of the image dimensions
|
||||
|
|
|
@ -112,7 +112,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
Contents::iterator i = mContents.insert (mContents.end (), Content (text.first, text.second));
|
||||
|
||||
if (i->empty())
|
||||
return Range (Utf8Point (NULL), Utf8Point (NULL));
|
||||
return Range (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||
|
||||
Utf8Point begin = &i->front ();
|
||||
Utf8Point end = &i->front () + i->size ();
|
||||
|
@ -150,7 +150,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
template <typename Visitor>
|
||||
void visitRuns (int top, int bottom, Visitor const & visitor) const
|
||||
{
|
||||
visitRuns (top, bottom, NULL, visitor);
|
||||
visitRuns (top, bottom, nullptr, visitor);
|
||||
}
|
||||
|
||||
StyleImpl * hitTest (int left, int top) const
|
||||
|
@ -187,7 +187,7 @@ struct TypesetBookImpl : TypesetBook
|
|||
for (Styles::iterator i = mStyles.begin (); i != mStyles.end (); ++i)
|
||||
if (&*i == style)
|
||||
return i->mFont;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct Typesetter;
|
||||
|
@ -227,8 +227,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
Typesetter (size_t width, size_t height) :
|
||||
mPageWidth (width), mPageHeight(height),
|
||||
mSection (NULL), mLine (NULL), mRun (NULL),
|
||||
mCurrentContent (NULL),
|
||||
mSection (nullptr), mLine (nullptr), mRun (nullptr),
|
||||
mCurrentContent (nullptr),
|
||||
mCurrentAlignment (AlignLeft)
|
||||
{
|
||||
mBook = std::make_shared <Book> ();
|
||||
|
@ -306,7 +306,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
void write (Style * style, size_t begin, size_t end)
|
||||
{
|
||||
assert (mCurrentContent != NULL);
|
||||
assert (mCurrentContent != nullptr);
|
||||
assert (end <= mCurrentContent->size ());
|
||||
assert (begin <= mCurrentContent->size ());
|
||||
|
||||
|
@ -322,8 +322,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
add_partial_text();
|
||||
|
||||
mRun = NULL;
|
||||
mLine = NULL;
|
||||
mRun = nullptr;
|
||||
mLine = nullptr;
|
||||
}
|
||||
|
||||
void sectionBreak (int margin)
|
||||
|
@ -332,9 +332,9 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
if (mBook->mSections.size () > 0)
|
||||
{
|
||||
mRun = NULL;
|
||||
mLine = NULL;
|
||||
mSection = NULL;
|
||||
mRun = nullptr;
|
||||
mLine = nullptr;
|
||||
mSection = nullptr;
|
||||
|
||||
if (mBook->mRect.bottom < (mBook->mSections.back ().mRect.bottom + margin))
|
||||
mBook->mRect.bottom = (mBook->mSections.back ().mRect.bottom + margin);
|
||||
|
@ -345,7 +345,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
{
|
||||
add_partial_text();
|
||||
|
||||
if (mSection != NULL)
|
||||
if (mSection != nullptr)
|
||||
mSectionAlignment.back () = sectionAlignment;
|
||||
mCurrentAlignment = sectionAlignment;
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
{
|
||||
add_partial_text();
|
||||
stream.consume ();
|
||||
mLine = NULL, mRun = NULL;
|
||||
mLine = nullptr, mRun = nullptr;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
if (left + space_width + word_width > mPageWidth)
|
||||
{
|
||||
mLine = NULL, mRun = NULL, left = 0;
|
||||
mLine = nullptr, mRun = nullptr, left = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -539,7 +539,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
|
||||
void append_run (StyleImpl * style, Utf8Stream::Point begin, Utf8Stream::Point end, int pc, int right, int bottom)
|
||||
{
|
||||
if (mSection == NULL)
|
||||
if (mSection == nullptr)
|
||||
{
|
||||
mBook->mSections.push_back (Section ());
|
||||
mSection = &mBook->mSections.back ();
|
||||
|
@ -547,7 +547,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
mSectionAlignment.push_back (mCurrentAlignment);
|
||||
}
|
||||
|
||||
if (mLine == NULL)
|
||||
if (mLine == nullptr)
|
||||
{
|
||||
mSection->mLines.push_back (Line ());
|
||||
mLine = &mSection->mLines.back ();
|
||||
|
@ -572,7 +572,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
|||
if (mLine->mRect.bottom < bottom)
|
||||
mLine->mRect.bottom = bottom;
|
||||
|
||||
if (mRun == NULL || mRun->mStyle != style || mRun->mRange.second != begin)
|
||||
if (mRun == nullptr || mRun->mStyle != style || mRun->mRange.second != begin)
|
||||
{
|
||||
int left = mRun ? mRun->mRight : mLine->mRect.left;
|
||||
|
||||
|
@ -802,17 +802,17 @@ protected:
|
|||
TextFormat (MyGUI::IFont* id, PageDisplay * display) :
|
||||
mFont (id),
|
||||
mCountVertex (0),
|
||||
mTexture (NULL),
|
||||
mRenderItem (NULL),
|
||||
mTexture (nullptr),
|
||||
mRenderItem (nullptr),
|
||||
mDisplay (display)
|
||||
{
|
||||
}
|
||||
|
||||
void createDrawItem (MyGUI::ILayerNode* node)
|
||||
{
|
||||
assert (mRenderItem == NULL);
|
||||
assert (mRenderItem == nullptr);
|
||||
|
||||
if (mTexture != NULL)
|
||||
if (mTexture != nullptr)
|
||||
{
|
||||
mRenderItem = node->addToRenderItem(mTexture, false, false);
|
||||
mRenderItem->addDrawItem(this, mCountVertex);
|
||||
|
@ -821,12 +821,12 @@ protected:
|
|||
|
||||
void destroyDrawItem (MyGUI::ILayerNode* node)
|
||||
{
|
||||
assert (mTexture != NULL ? mRenderItem != NULL : mRenderItem == NULL);
|
||||
assert (mTexture != nullptr ? mRenderItem != nullptr : mRenderItem == nullptr);
|
||||
|
||||
if (mTexture != NULL)
|
||||
if (mTexture != nullptr)
|
||||
{
|
||||
mRenderItem->removeDrawItem (this);
|
||||
mRenderItem = NULL;
|
||||
mRenderItem = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -879,9 +879,9 @@ public:
|
|||
resetPage ();
|
||||
mViewTop = 0;
|
||||
mViewBottom = 0;
|
||||
mFocusItem = NULL;
|
||||
mFocusItem = nullptr;
|
||||
mItemActive = false;
|
||||
mNode = NULL;
|
||||
mNode = nullptr;
|
||||
}
|
||||
|
||||
void dirtyFocusItem ()
|
||||
|
@ -999,14 +999,14 @@ public:
|
|||
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
{
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
i->second->destroyDrawItem (mNode);
|
||||
delete i->second;
|
||||
}
|
||||
|
||||
mActiveTextFormats.clear ();
|
||||
|
||||
if (newBook != NULL)
|
||||
if (newBook != nullptr)
|
||||
{
|
||||
createActiveFormats (newBook);
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ public:
|
|||
else
|
||||
if (mBook && isPageDifferent (newPage))
|
||||
{
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
mNode->outOfDate(i->second->mRenderItem);
|
||||
|
||||
|
@ -1083,7 +1083,7 @@ public:
|
|||
{
|
||||
newBook->visitRuns (0, 0x7FFFFFFF, CreateActiveFormat (this));
|
||||
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
i->second->createDrawItem (mNode);
|
||||
}
|
||||
|
@ -1187,7 +1187,7 @@ public:
|
|||
{
|
||||
_checkMargin ();
|
||||
|
||||
if (mNode != NULL)
|
||||
if (mNode != nullptr)
|
||||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
mNode->outOfDate (i->second->mRenderItem);
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ public:
|
|||
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
|
||||
i->second->destroyDrawItem (mNode);
|
||||
|
||||
mNode = NULL;
|
||||
mNode = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -381,12 +381,12 @@ namespace MWGui
|
|||
|
||||
CreateClassDialog::CreateClassDialog()
|
||||
: WindowModal("openmw_chargen_create_class.layout")
|
||||
, mSpecDialog(NULL)
|
||||
, mAttribDialog(NULL)
|
||||
, mSkillDialog(NULL)
|
||||
, mDescDialog(NULL)
|
||||
, mAffectedAttribute(NULL)
|
||||
, mAffectedSkill(NULL)
|
||||
, mSpecDialog(nullptr)
|
||||
, mAttribDialog(nullptr)
|
||||
, mSkillDialog(nullptr)
|
||||
, mDescDialog(nullptr)
|
||||
, mAffectedAttribute(nullptr)
|
||||
, mAffectedSkill(nullptr)
|
||||
{
|
||||
// Centre dialog
|
||||
center();
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace MWGui
|
|||
|
||||
CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager)
|
||||
: WindowBase("openmw_companion_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
, mSelectedItem(-1)
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mMessageBoxManager(manager)
|
||||
|
@ -89,7 +89,7 @@ void CompanionWindow::onItemSelected(int index)
|
|||
dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem);
|
||||
}
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
|
||||
void CompanionWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||
|
@ -177,9 +177,9 @@ void CompanionWindow::onReferenceUnavailable()
|
|||
void CompanionWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace MWGui
|
|||
{
|
||||
// Apparently, hidden widgets can retain key focus
|
||||
// Remove for MyGUI 3.2.2
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
}
|
||||
|
||||
void Console::exit()
|
||||
|
|
|
@ -34,8 +34,8 @@ namespace MWGui
|
|||
: WindowBase("openmw_container_window.layout")
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mPickpocketDetected(false)
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
, mSelectedItem(-1)
|
||||
{
|
||||
getWidget(mDisposeCorpseButton, "DisposeCorpseButton");
|
||||
|
@ -88,7 +88,7 @@ namespace MWGui
|
|||
dialog->eventOkClicked += MyGUI::newDelegate(this, &ContainerWindow::dragItem);
|
||||
}
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
|
||||
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||
|
@ -169,9 +169,9 @@ namespace MWGui
|
|||
void ContainerWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
|
||||
void ContainerWindow::close()
|
||||
|
@ -200,7 +200,7 @@ namespace MWGui
|
|||
|
||||
void ContainerWindow::exit()
|
||||
{
|
||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Container);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ namespace MWGui
|
|||
|
||||
void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
{
|
||||
// transfer everything into the player's inventory
|
||||
ItemModel* playerModel = MWBase::Environment::get().getWindowManager()->getInventoryWindow()->getModel();
|
||||
|
@ -242,7 +242,7 @@ namespace MWGui
|
|||
|
||||
void ContainerWindow::onDisposeCorpseButtonClicked(MyGUI::Widget *sender)
|
||||
{
|
||||
if(mDragAndDrop == NULL || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
if(mDragAndDrop == nullptr || !mDragAndDrop->mIsOnDragAndDrop)
|
||||
{
|
||||
onTakeAllButtonClicked(mTakeButton);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace MWGui
|
|||
|
||||
void CountDialog::onOkButtonClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
||||
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||
|
||||
setVisible(false);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ namespace MWGui
|
|||
// Enter key
|
||||
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
|
||||
{
|
||||
eventOkClicked(NULL, mSlider->getScrollPosition()+1);
|
||||
eventOkClicked(nullptr, mSlider->getScrollPosition()+1);
|
||||
|
||||
setVisible(false);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MWGui
|
|||
|
||||
|
||||
ResourceImageSetPointerFix::ResourceImageSetPointerFix()
|
||||
: mImageSet(NULL)
|
||||
: mImageSet(nullptr)
|
||||
, mRotation(0)
|
||||
{
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ namespace MWGui
|
|||
|
||||
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
||||
{
|
||||
if (mImageSet != NULL)
|
||||
if (mImageSet != nullptr)
|
||||
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ namespace MWGui
|
|||
|
||||
DragAndDrop::DragAndDrop()
|
||||
: mIsOnDragAndDrop(false)
|
||||
, mDraggedWidget(NULL)
|
||||
, mSourceModel(NULL)
|
||||
, mSourceView(NULL)
|
||||
, mSourceSortModel(NULL)
|
||||
, mDraggedWidget(nullptr)
|
||||
, mSourceModel(nullptr)
|
||||
, mSourceView(nullptr)
|
||||
, mSourceSortModel(nullptr)
|
||||
, mDraggedCount(0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace MWGui
|
|||
EnchantingDialog::EnchantingDialog()
|
||||
: WindowBase("openmw_enchanting_dialog.layout")
|
||||
, EffectEditorBase(EffectEditorBase::Enchanting)
|
||||
, mItemSelectionDialog(NULL)
|
||||
, mItemSelectionDialog(nullptr)
|
||||
{
|
||||
getWidget(mName, "NameEdit");
|
||||
getWidget(mCancelButton, "CancelButton");
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
if (widgets.empty())
|
||||
{
|
||||
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
|||
BookTextParser::BookTextParser(const std::string & text)
|
||||
: mIndex(0), mText(text), mIgnoreNewlineTags(true), mIgnoreLineEndings(true), mClosingTag(false)
|
||||
{
|
||||
MWScript::InterpreterContext interpreterContext(NULL, MWWorld::Ptr()); // empty arguments, because there is no locals or actor
|
||||
MWScript::InterpreterContext interpreterContext(nullptr, MWWorld::Ptr()); // empty arguments, because there is no locals or actor
|
||||
mText = Interpreter::fixDefinesBook(mText, interpreterContext);
|
||||
|
||||
boost::algorithm::replace_all(mText, "\r", "");
|
||||
|
|
|
@ -70,23 +70,23 @@ namespace MWGui
|
|||
HUD::HUD(CustomMarkerCollection &customMarkers, bool showFps, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
||||
: Layout("openmw_hud.layout")
|
||||
, LocalMapBase(customMarkers, localMapRender)
|
||||
, mHealth(NULL)
|
||||
, mMagicka(NULL)
|
||||
, mStamina(NULL)
|
||||
, mDrowning(NULL)
|
||||
, mWeapImage(NULL)
|
||||
, mSpellImage(NULL)
|
||||
, mWeapStatus(NULL)
|
||||
, mSpellStatus(NULL)
|
||||
, mEffectBox(NULL)
|
||||
, mMinimap(NULL)
|
||||
, mCompass(NULL)
|
||||
, mCrosshair(NULL)
|
||||
, mCellNameBox(NULL)
|
||||
, mDrowningFrame(NULL)
|
||||
, mDrowningFlash(NULL)
|
||||
, mFpsBox(NULL)
|
||||
, mFpsCounter(NULL)
|
||||
, mHealth(nullptr)
|
||||
, mMagicka(nullptr)
|
||||
, mStamina(nullptr)
|
||||
, mDrowning(nullptr)
|
||||
, mWeapImage(nullptr)
|
||||
, mSpellImage(nullptr)
|
||||
, mWeapStatus(nullptr)
|
||||
, mSpellStatus(nullptr)
|
||||
, mEffectBox(nullptr)
|
||||
, mMinimap(nullptr)
|
||||
, mCompass(nullptr)
|
||||
, mCrosshair(nullptr)
|
||||
, mCellNameBox(nullptr)
|
||||
, mDrowningFrame(nullptr)
|
||||
, mDrowningFlash(nullptr)
|
||||
, mFpsBox(nullptr)
|
||||
, mFpsCounter(nullptr)
|
||||
, mHealthManaStaminaBaseLeft(0)
|
||||
, mWeapBoxBaseLeft(0)
|
||||
, mSpellBoxBaseLeft(0)
|
||||
|
@ -268,7 +268,7 @@ namespace MWGui
|
|||
float mouseY = cursorPosition.top / float(viewSize.height);
|
||||
|
||||
WorldItemModel drop (mouseX, mouseY);
|
||||
mDragAndDrop->drop(&drop, NULL);
|
||||
mDragAndDrop->drop(&drop, nullptr);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ namespace MWGui
|
|||
: WindowPinnableBase("openmw_inventory_window.layout")
|
||||
, mDragAndDrop(dragAndDrop)
|
||||
, mSelectedItem(-1)
|
||||
, mSortModel(NULL)
|
||||
, mTradeModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mTradeModel(nullptr)
|
||||
, mGuiMode(GM_Inventory)
|
||||
, mLastXSize(0)
|
||||
, mLastYSize(0)
|
||||
|
@ -249,9 +249,9 @@ namespace MWGui
|
|||
{
|
||||
mSelectedItem = index;
|
||||
if (mTrading)
|
||||
sellItem (NULL, count);
|
||||
sellItem (nullptr, count);
|
||||
else
|
||||
dragItem (NULL, count);
|
||||
dragItem (nullptr, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace MWGui
|
|||
ItemStack::ItemStack()
|
||||
: mType(Type_Normal)
|
||||
, mFlags(0)
|
||||
, mCreator(NULL)
|
||||
, mCreator(nullptr)
|
||||
, mCount(0)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace MWGui
|
|||
|
||||
ItemSelectionDialog::ItemSelectionDialog(const std::string &label)
|
||||
: WindowModal("openmw_itemselection_dialog.layout")
|
||||
, mSortModel(NULL)
|
||||
, mModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mModel(nullptr)
|
||||
{
|
||||
getWidget(mItemView, "ItemView");
|
||||
mItemView->eventItemClicked += MyGUI::newDelegate(this, &ItemSelectionDialog::onSelectedItem);
|
||||
|
|
|
@ -18,8 +18,8 @@ namespace MWGui
|
|||
{
|
||||
|
||||
ItemView::ItemView()
|
||||
: mModel(NULL)
|
||||
, mScrollView(NULL)
|
||||
: mModel(nullptr)
|
||||
, mScrollView(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ void ItemView::initialiseOverride()
|
|||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mScrollView, "ScrollView");
|
||||
if (mScrollView == NULL)
|
||||
if (mScrollView == nullptr)
|
||||
throw std::runtime_error("Item view needs a scroll view");
|
||||
|
||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
|
|
|
@ -27,9 +27,9 @@ namespace MWGui
|
|||
{
|
||||
|
||||
ItemWidget::ItemWidget()
|
||||
: mItem(NULL)
|
||||
, mFrame(NULL)
|
||||
, mText(NULL)
|
||||
: mItem(nullptr)
|
||||
, mFrame(nullptr)
|
||||
, mText(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ struct JournalViewModelImpl : JournalViewModel
|
|||
static Utf8Span toUtf8Span (std::string const & str)
|
||||
{
|
||||
if (str.size () == 0)
|
||||
return Utf8Span (Utf8Point (NULL), Utf8Point (NULL));
|
||||
return Utf8Span (Utf8Point (nullptr), Utf8Point (nullptr));
|
||||
|
||||
Utf8Point point = reinterpret_cast <Utf8Point> (str.c_str ());
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace MWGui
|
|||
|
||||
// Callback removes itself when done
|
||||
if (renderInfo.getCurrentCamera())
|
||||
renderInfo.getCurrentCamera()->setInitialDrawCallback(NULL);
|
||||
renderInfo.getCurrentCamera()->setInitialDrawCallback(nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -32,10 +32,10 @@ namespace MWGui
|
|||
: Layout("openmw_mainmenu.layout")
|
||||
, mWidth (w), mHeight (h)
|
||||
, mVFS(vfs), mButtonBox(0)
|
||||
, mBackground(NULL)
|
||||
, mVideoBackground(NULL)
|
||||
, mVideo(NULL)
|
||||
, mSaveGameDialog(NULL)
|
||||
, mBackground(nullptr)
|
||||
, mVideoBackground(nullptr)
|
||||
, mVideo(nullptr)
|
||||
, mSaveGameDialog(nullptr)
|
||||
{
|
||||
getWidget(mVersionText, "VersionText");
|
||||
std::stringstream sstream;
|
||||
|
@ -149,13 +149,13 @@ namespace MWGui
|
|||
if (mVideo && !show)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mVideoBackground);
|
||||
mVideoBackground = NULL;
|
||||
mVideo = NULL;
|
||||
mVideoBackground = nullptr;
|
||||
mVideo = nullptr;
|
||||
}
|
||||
if (mBackground && !show)
|
||||
{
|
||||
MyGUI::Gui::getInstance().destroyWidget(mBackground);
|
||||
mBackground = NULL;
|
||||
mBackground = nullptr;
|
||||
}
|
||||
|
||||
if (!show)
|
||||
|
|
|
@ -146,8 +146,8 @@ namespace MWGui
|
|||
, mCurX(0)
|
||||
, mCurY(0)
|
||||
, mInterior(false)
|
||||
, mLocalMap(NULL)
|
||||
, mCompass(NULL)
|
||||
, mLocalMap(nullptr)
|
||||
, mCompass(nullptr)
|
||||
, mPrefix()
|
||||
, mChanged(true)
|
||||
, mFogOfWar(true)
|
||||
|
@ -377,7 +377,7 @@ namespace MWGui
|
|||
box->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||
}
|
||||
else
|
||||
box->setRenderItemTexture(NULL);
|
||||
box->setRenderItemTexture(nullptr);
|
||||
}
|
||||
}
|
||||
mMapTextures.swap(textures);
|
||||
|
@ -551,7 +551,7 @@ namespace MWGui
|
|||
addDetectionMarkers(MWBase::World::Detect_Enchantment);
|
||||
|
||||
// Add marker for the spot marked with Mark magic effect
|
||||
MWWorld::CellStore* markedCell = NULL;
|
||||
MWWorld::CellStore* markedCell = nullptr;
|
||||
ESM::Position markedPosition;
|
||||
MWBase::Environment::get().getWorld()->getPlayer().getMarkedPosition(markedCell, markedPosition);
|
||||
if (markedCell && markedCell->isExterior() == !mInterior
|
||||
|
@ -580,11 +580,11 @@ namespace MWGui
|
|||
, LocalMapBase(customMarkers, localMapRender)
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mGlobalMap(0)
|
||||
, mGlobalMapImage(NULL)
|
||||
, mGlobalMapOverlay(NULL)
|
||||
, mGlobalMapImage(nullptr)
|
||||
, mGlobalMapOverlay(nullptr)
|
||||
, mGlobal(false)
|
||||
, mEventBoxGlobal(NULL)
|
||||
, mEventBoxLocal(NULL)
|
||||
, mEventBoxGlobal(nullptr)
|
||||
, mEventBoxLocal(nullptr)
|
||||
, mGlobalMapRender(new MWRender::GlobalMap(localMapRender->getRoot()))
|
||||
, mEditNoteDialog()
|
||||
{
|
||||
|
|
|
@ -19,8 +19,8 @@ namespace MWGui
|
|||
|
||||
MessageBoxManager::MessageBoxManager (float timePerChar)
|
||||
{
|
||||
mInterMessageBoxe = NULL;
|
||||
mStaticMessageBox = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
mStaticMessageBox = nullptr;
|
||||
mLastButtonPressed = -1;
|
||||
mMessageBoxSpeed = timePerChar;
|
||||
}
|
||||
|
@ -37,13 +37,13 @@ namespace MWGui
|
|||
void MessageBoxManager::clear()
|
||||
{
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
|
||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||
for (; it != mMessageBoxes.end(); ++it)
|
||||
{
|
||||
if (*it == mStaticMessageBox)
|
||||
mStaticMessageBox = NULL;
|
||||
mStaticMessageBox = nullptr;
|
||||
delete *it;
|
||||
}
|
||||
mMessageBoxes.clear();
|
||||
|
@ -75,10 +75,10 @@ namespace MWGui
|
|||
++it;
|
||||
}
|
||||
|
||||
if(mInterMessageBoxe != NULL && mInterMessageBoxe->mMarkedToDelete) {
|
||||
if(mInterMessageBoxe != nullptr && mInterMessageBoxe->mMarkedToDelete) {
|
||||
mLastButtonPressed = mInterMessageBoxe->readPressedButton();
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
mInterMessageBoxe = nullptr;
|
||||
MWBase::Environment::get().getInputManager()->changeInputMode(
|
||||
MWBase::Environment::get().getWindowManager()->isGuiMode());
|
||||
}
|
||||
|
@ -112,12 +112,12 @@ namespace MWGui
|
|||
void MessageBoxManager::removeStaticMessageBox ()
|
||||
{
|
||||
removeMessageBox(mStaticMessageBox);
|
||||
mStaticMessageBox = NULL;
|
||||
mStaticMessageBox = nullptr;
|
||||
}
|
||||
|
||||
bool MessageBoxManager::createInteractiveMessageBox (const std::string& message, const std::vector<std::string>& buttons)
|
||||
{
|
||||
if(mInterMessageBoxe != NULL) {
|
||||
if(mInterMessageBoxe != nullptr) {
|
||||
throw std::runtime_error("There is a message box already");
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ namespace MWGui
|
|||
|
||||
bool MessageBoxManager::isInteractiveMessageBox ()
|
||||
{
|
||||
return mInterMessageBoxe != NULL;
|
||||
return mInterMessageBoxe != nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -133,10 +133,10 @@ namespace MWGui
|
|||
updateSkills();
|
||||
updateSpellPowers();
|
||||
|
||||
mPreviewImage->setRenderItemTexture(NULL);
|
||||
mPreviewImage->setRenderItemTexture(nullptr);
|
||||
|
||||
mPreview.reset(NULL);
|
||||
mPreviewTexture.reset(NULL);
|
||||
mPreview.reset(nullptr);
|
||||
mPreviewTexture.reset(nullptr);
|
||||
|
||||
mPreview.reset(new MWRender::RaceSelectionPreview(mViewer, mResourceSystem));
|
||||
mPreview->rebuild();
|
||||
|
@ -189,10 +189,10 @@ namespace MWGui
|
|||
|
||||
void RaceDialog::close()
|
||||
{
|
||||
mPreviewImage->setRenderItemTexture(NULL);
|
||||
mPreviewImage->setRenderItemTexture(nullptr);
|
||||
|
||||
mPreviewTexture.reset(NULL);
|
||||
mPreview.reset(NULL);
|
||||
mPreviewTexture.reset(nullptr);
|
||||
mPreview.reset(nullptr);
|
||||
}
|
||||
|
||||
// widget controls
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
namespace MWGui
|
||||
{
|
||||
ReferenceInterface::ReferenceInterface()
|
||||
: mCurrentPlayerCell(NULL)
|
||||
: mCurrentPlayerCell(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace MWGui
|
|||
MWWorld::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayerPtr().getCell();
|
||||
|
||||
// check if player has changed cell, or count of the reference has become 0
|
||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != nullptr)
|
||||
|| (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0))
|
||||
{
|
||||
if (!mPtr.isEmpty())
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace MWGui
|
|||
|
||||
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
||||
|
||||
virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = NULL; }
|
||||
virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = nullptr; }
|
||||
|
||||
protected:
|
||||
virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable
|
||||
|
|
|
@ -32,8 +32,8 @@ namespace MWGui
|
|||
SaveGameDialog::SaveGameDialog()
|
||||
: WindowModal("openmw_savegame_dialog.layout")
|
||||
, mSaving(true)
|
||||
, mCurrentCharacter(NULL)
|
||||
, mCurrentSlot(NULL)
|
||||
, mCurrentCharacter(nullptr)
|
||||
, mCurrentSlot(nullptr)
|
||||
{
|
||||
getWidget(mScreenshot, "Screenshot");
|
||||
getWidget(mCharacterSelection, "SelectCharacter");
|
||||
|
@ -120,8 +120,8 @@ namespace MWGui
|
|||
|
||||
mCharacterSelection->setCaption("");
|
||||
mCharacterSelection->removeAllItems();
|
||||
mCurrentCharacter = NULL;
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentCharacter = nullptr;
|
||||
mCurrentSlot = nullptr;
|
||||
mSaveList->removeAllItems();
|
||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||
|
||||
|
@ -224,12 +224,12 @@ namespace MWGui
|
|||
void SaveGameDialog::accept(bool reallySure)
|
||||
{
|
||||
// Remove for MyGUI 3.2.2
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
|
||||
if (mSaving)
|
||||
{
|
||||
// If overwriting an existing slot, ask for confirmation first
|
||||
if (mCurrentSlot != NULL && !reallySure)
|
||||
if (mCurrentSlot != nullptr && !reallySure)
|
||||
{
|
||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||
dialog->askForConfirmation("#{sMessage4}");
|
||||
|
@ -275,7 +275,7 @@ namespace MWGui
|
|||
MWBase::StateManager* mgr = MWBase::Environment::get().getStateManager();
|
||||
|
||||
unsigned int i=0;
|
||||
const MWState::Character* character = NULL;
|
||||
const MWState::Character* character = nullptr;
|
||||
for (MWBase::StateManager::CharacterIterator it = mgr->characterBegin(); it != mgr->characterEnd(); ++it, ++i)
|
||||
{
|
||||
if (i == pos)
|
||||
|
@ -284,7 +284,7 @@ namespace MWGui
|
|||
assert(character && "Can't find selected character");
|
||||
|
||||
mCurrentCharacter = character;
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
fillSaveList();
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ namespace MWGui
|
|||
|
||||
if (pos == MyGUI::ITEM_NONE || !mCurrentCharacter)
|
||||
{
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
mInfoText->setCaption("");
|
||||
mScreenshot->setImageTexture("");
|
||||
return;
|
||||
|
@ -325,7 +325,7 @@ namespace MWGui
|
|||
if (mSaving)
|
||||
mSaveNameEdit->setCaption(sender->getItemNameAt(pos));
|
||||
|
||||
mCurrentSlot = NULL;
|
||||
mCurrentSlot = nullptr;
|
||||
unsigned int i=0;
|
||||
for (MWState::Character::SlotIterator it = mCurrentCharacter->begin(); it != mCurrentCharacter->end(); ++it, ++i)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace MWGui
|
|||
EditEffectDialog::EditEffectDialog()
|
||||
: WindowModal("openmw_edit_effect.layout")
|
||||
, mEditing(false)
|
||||
, mMagicEffect(NULL)
|
||||
, mMagicEffect(nullptr)
|
||||
, mConstantEffect(false)
|
||||
{
|
||||
init(mEffect);
|
||||
|
@ -482,11 +482,11 @@ namespace MWGui
|
|||
|
||||
|
||||
EffectEditorBase::EffectEditorBase(Type type)
|
||||
: mAvailableEffectsList(NULL)
|
||||
, mUsedEffectsView(NULL)
|
||||
: mAvailableEffectsList(nullptr)
|
||||
, mUsedEffectsView(nullptr)
|
||||
, mAddEffectDialog()
|
||||
, mSelectAttributeDialog(NULL)
|
||||
, mSelectSkillDialog(NULL)
|
||||
, mSelectAttributeDialog(nullptr)
|
||||
, mSelectSkillDialog(nullptr)
|
||||
, mSelectedEffect(0)
|
||||
, mSelectedKnownEffectId(0)
|
||||
, mConstantEffect(false)
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace MWGui
|
|||
}
|
||||
|
||||
SpellView::SpellView()
|
||||
: mScrollView(NULL)
|
||||
: mScrollView(nullptr)
|
||||
, mShowCostColumn(true)
|
||||
, mHighlightSelected(true)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ namespace MWGui
|
|||
Base::initialiseOverride();
|
||||
|
||||
assignWidget(mScrollView, "ScrollView");
|
||||
if (mScrollView == NULL)
|
||||
if (mScrollView == nullptr)
|
||||
throw std::runtime_error("Item view needs a scroll view");
|
||||
|
||||
mScrollView->setCanvasAlign(MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
|
@ -126,7 +126,7 @@ namespace MWGui
|
|||
mLines.push_back(LineInfo(t, costChance, i));
|
||||
}
|
||||
else
|
||||
mLines.push_back(LineInfo(t, (MyGUI::Widget*)NULL, i));
|
||||
mLines.push_back(LineInfo(t, (MyGUI::Widget*)nullptr, i));
|
||||
|
||||
t->setStateSelected(spell.mSelected);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ namespace MWGui
|
|||
{
|
||||
maxSpellIndexFound = spellIndex;
|
||||
Gui::SharedStateButton* costButton = reinterpret_cast<Gui::SharedStateButton*>(it->mRightWidget);
|
||||
if ((costButton != NULL) && (costButton->getCaption() != spell.mCostColumn))
|
||||
if ((costButton != nullptr) && (costButton->getCaption() != spell.mCostColumn))
|
||||
{
|
||||
costButton->setCaption(spell.mCostColumn);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ namespace MWGui
|
|||
MyGUI::IntCoord(0, 0, mScrollView->getWidth(), 18),
|
||||
MyGUI::Align::Left | MyGUI::Align::Top);
|
||||
separator->setNeedMouseFocus(false);
|
||||
mLines.push_back(LineInfo(separator, (MyGUI::Widget*)NULL, NoSpellIndex));
|
||||
mLines.push_back(LineInfo(separator, (MyGUI::Widget*)nullptr, NoSpellIndex));
|
||||
}
|
||||
|
||||
MyGUI::TextBox* groupWidget = mScrollView->createWidget<MyGUI::TextBox>("SandBrightText",
|
||||
|
@ -254,7 +254,7 @@ namespace MWGui
|
|||
mLines.push_back(LineInfo(groupWidget, groupWidget2, NoSpellIndex));
|
||||
}
|
||||
else
|
||||
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)NULL, NoSpellIndex));
|
||||
mLines.push_back(LineInfo(groupWidget, (MyGUI::Widget*)nullptr, NoSpellIndex));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
|||
SpellWindow::SpellWindow(DragAndDrop* drag)
|
||||
: WindowPinnableBase("openmw_spell_window.layout")
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mSpellView(NULL)
|
||||
, mSpellView(nullptr)
|
||||
, mUpdateTimer(0.0f)
|
||||
{
|
||||
mSpellIcons = new SpellIcons();
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace MWGui
|
|||
StatsWindow::StatsWindow (DragAndDrop* drag)
|
||||
: WindowPinnableBase("openmw_stats_window.layout")
|
||||
, NoDrop(drag, mMainWidget)
|
||||
, mSkillView(NULL)
|
||||
, mSkillView(nullptr)
|
||||
, mMajorSkills()
|
||||
, mMinorSkills()
|
||||
, mMiscSkills()
|
||||
|
@ -68,7 +68,7 @@ namespace MWGui
|
|||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||
{
|
||||
mSkillValues.insert(std::pair<int, MWMechanics::SkillValue >(i, MWMechanics::SkillValue()));
|
||||
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)NULL));
|
||||
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)nullptr));
|
||||
}
|
||||
|
||||
MyGUI::Window* t = mMainWidget->castType<MyGUI::Window>();
|
||||
|
|
|
@ -54,8 +54,8 @@ namespace MWGui
|
|||
|
||||
TradeWindow::TradeWindow()
|
||||
: WindowBase("openmw_trade_window.layout")
|
||||
, mSortModel(NULL)
|
||||
, mTradeModel(NULL)
|
||||
, mSortModel(nullptr)
|
||||
, mTradeModel(nullptr)
|
||||
, mItemToSell(-1)
|
||||
, mCurrentBalance(0)
|
||||
, mCurrentMerchantOffer(0)
|
||||
|
@ -203,7 +203,7 @@ namespace MWGui
|
|||
else
|
||||
{
|
||||
mItemToSell = mSortModel->mapToSource(index);
|
||||
sellItem (NULL, count);
|
||||
sellItem (nullptr, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -560,8 +560,8 @@ namespace MWGui
|
|||
void TradeWindow::resetReference()
|
||||
{
|
||||
ReferenceInterface::resetReference();
|
||||
mItemView->setModel(NULL);
|
||||
mTradeModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(nullptr);
|
||||
mTradeModel = nullptr;
|
||||
mSortModel = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace MWGui
|
|||
{
|
||||
|
||||
VideoWidget::VideoWidget()
|
||||
: mVFS(NULL)
|
||||
: mVFS(nullptr)
|
||||
{
|
||||
mPlayer.reset(new Video::VideoPlayer());
|
||||
setNeedKeyFocus(true);
|
||||
|
|
|
@ -229,7 +229,7 @@ namespace MWGui
|
|||
mSleeping = canRest;
|
||||
|
||||
Gui::Box* box = dynamic_cast<Gui::Box*>(mMainWidget);
|
||||
if (box == NULL)
|
||||
if (box == nullptr)
|
||||
throw std::runtime_error("main widget must be a box");
|
||||
box->notifyChildrenSizeChanged();
|
||||
center();
|
||||
|
|
|
@ -23,8 +23,8 @@ namespace MWGui
|
|||
|
||||
MWSkill::MWSkill()
|
||||
: mSkillId(ESM::Skill::Length)
|
||||
, mSkillNameWidget(NULL)
|
||||
, mSkillValueWidget(NULL)
|
||||
, mSkillNameWidget(nullptr)
|
||||
, mSkillValueWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -114,8 +114,8 @@ namespace MWGui
|
|||
|
||||
MWAttribute::MWAttribute()
|
||||
: mId(-1)
|
||||
, mAttributeNameWidget(NULL)
|
||||
, mAttributeValueWidget(NULL)
|
||||
, mAttributeNameWidget(nullptr)
|
||||
, mAttributeValueWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ namespace MWGui
|
|||
/* MWSpell */
|
||||
|
||||
MWSpell::MWSpell()
|
||||
: mSpellNameWidget(NULL)
|
||||
: mSpellNameWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ namespace MWGui
|
|||
{
|
||||
// We don't know the width of all the elements beforehand, so we do it in
|
||||
// 2 steps: first, create all widgets and check their width....
|
||||
MWSpellEffectPtr effect = NULL;
|
||||
MWSpellEffectPtr effect = nullptr;
|
||||
int maxwidth = coord.width;
|
||||
|
||||
for (SpellEffectList::iterator it=mEffectList.begin();
|
||||
|
@ -359,8 +359,8 @@ namespace MWGui
|
|||
/* MWSpellEffect */
|
||||
|
||||
MWSpellEffect::MWSpellEffect()
|
||||
: mImageWidget(NULL)
|
||||
, mTextWidget(NULL)
|
||||
: mImageWidget(nullptr)
|
||||
, mTextWidget(nullptr)
|
||||
, mRequestedWidth(0)
|
||||
{
|
||||
}
|
||||
|
@ -489,9 +489,9 @@ namespace MWGui
|
|||
MWDynamicStat::MWDynamicStat()
|
||||
: mValue(0)
|
||||
, mMax(1)
|
||||
, mTextWidget(NULL)
|
||||
, mBarWidget(NULL)
|
||||
, mBarTextWidget(NULL)
|
||||
, mTextWidget(nullptr)
|
||||
, mBarWidget(nullptr)
|
||||
, mBarTextWidget(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ void WindowBase::setVisible(bool visible)
|
|||
if (!visible)
|
||||
{
|
||||
MyGUI::Widget* keyFocus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||
while (keyFocus != mMainWidget && keyFocus != NULL)
|
||||
while (keyFocus != mMainWidget && keyFocus != nullptr)
|
||||
keyFocus = keyFocus->getParent();
|
||||
|
||||
if (keyFocus == mMainWidget)
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(NULL);
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget)
|
|||
: mWidget(widget), mDrag(drag), mTransparent(false)
|
||||
{
|
||||
if (!mWidget)
|
||||
throw std::runtime_error("NoDrop needs a non-NULL widget!");
|
||||
throw std::runtime_error("NoDrop needs a non-nullptr widget!");
|
||||
}
|
||||
|
||||
void NoDrop::onFrame(float dt)
|
||||
|
|
|
@ -115,52 +115,52 @@ namespace MWGui
|
|||
, mViewer(viewer)
|
||||
, mConsoleOnlyScripts(consoleOnlyScripts)
|
||||
, mCurrentModals()
|
||||
, mHud(NULL)
|
||||
, mMap(NULL)
|
||||
, mLocalMapRender(NULL)
|
||||
, mMenu(NULL)
|
||||
, mToolTips(NULL)
|
||||
, mStatsWindow(NULL)
|
||||
, mMessageBoxManager(NULL)
|
||||
, mConsole(NULL)
|
||||
, mJournal(NULL)
|
||||
, mDialogueWindow(NULL)
|
||||
, mContainerWindow(NULL)
|
||||
, mDragAndDrop(NULL)
|
||||
, mInventoryWindow(NULL)
|
||||
, mScrollWindow(NULL)
|
||||
, mBookWindow(NULL)
|
||||
, mCountDialog(NULL)
|
||||
, mTradeWindow(NULL)
|
||||
, mSpellBuyingWindow(NULL)
|
||||
, mTravelWindow(NULL)
|
||||
, mSettingsWindow(NULL)
|
||||
, mConfirmationDialog(NULL)
|
||||
, mAlchemyWindow(NULL)
|
||||
, mSpellWindow(NULL)
|
||||
, mQuickKeysMenu(NULL)
|
||||
, mLoadingScreen(NULL)
|
||||
, mLevelupDialog(NULL)
|
||||
, mWaitDialog(NULL)
|
||||
, mSpellCreationDialog(NULL)
|
||||
, mEnchantingDialog(NULL)
|
||||
, mTrainingWindow(NULL)
|
||||
, mMerchantRepair(NULL)
|
||||
, mSoulgemDialog(NULL)
|
||||
, mRepair(NULL)
|
||||
, mRecharge(NULL)
|
||||
, mCompanionWindow(NULL)
|
||||
, mVideoBackground(NULL)
|
||||
, mVideoWidget(NULL)
|
||||
, mWerewolfFader(NULL)
|
||||
, mBlindnessFader(NULL)
|
||||
, mHitFader(NULL)
|
||||
, mScreenFader(NULL)
|
||||
, mDebugWindow(NULL)
|
||||
, mJailScreen(NULL)
|
||||
, mHud(nullptr)
|
||||
, mMap(nullptr)
|
||||
, mLocalMapRender(nullptr)
|
||||
, mMenu(nullptr)
|
||||
, mToolTips(nullptr)
|
||||
, mStatsWindow(nullptr)
|
||||
, mMessageBoxManager(nullptr)
|
||||
, mConsole(nullptr)
|
||||
, mJournal(nullptr)
|
||||
, mDialogueWindow(nullptr)
|
||||
, mContainerWindow(nullptr)
|
||||
, mDragAndDrop(nullptr)
|
||||
, mInventoryWindow(nullptr)
|
||||
, mScrollWindow(nullptr)
|
||||
, mBookWindow(nullptr)
|
||||
, mCountDialog(nullptr)
|
||||
, mTradeWindow(nullptr)
|
||||
, mSpellBuyingWindow(nullptr)
|
||||
, mTravelWindow(nullptr)
|
||||
, mSettingsWindow(nullptr)
|
||||
, mConfirmationDialog(nullptr)
|
||||
, mAlchemyWindow(nullptr)
|
||||
, mSpellWindow(nullptr)
|
||||
, mQuickKeysMenu(nullptr)
|
||||
, mLoadingScreen(nullptr)
|
||||
, mLevelupDialog(nullptr)
|
||||
, mWaitDialog(nullptr)
|
||||
, mSpellCreationDialog(nullptr)
|
||||
, mEnchantingDialog(nullptr)
|
||||
, mTrainingWindow(nullptr)
|
||||
, mMerchantRepair(nullptr)
|
||||
, mSoulgemDialog(nullptr)
|
||||
, mRepair(nullptr)
|
||||
, mRecharge(nullptr)
|
||||
, mCompanionWindow(nullptr)
|
||||
, mVideoBackground(nullptr)
|
||||
, mVideoWidget(nullptr)
|
||||
, mWerewolfFader(nullptr)
|
||||
, mBlindnessFader(nullptr)
|
||||
, mHitFader(nullptr)
|
||||
, mScreenFader(nullptr)
|
||||
, mDebugWindow(nullptr)
|
||||
, mJailScreen(nullptr)
|
||||
, mTranslationDataStorage (translationDataStorage)
|
||||
, mCharGen(NULL)
|
||||
, mInputBlocker(NULL)
|
||||
, mCharGen(nullptr)
|
||||
, mInputBlocker(nullptr)
|
||||
, mCrosshairEnabled(Settings::Manager::getBool ("crosshair", "HUD"))
|
||||
, mSubtitlesEnabled(Settings::Manager::getBool ("subtitles", "GUI"))
|
||||
, mHitFaderEnabled(Settings::Manager::getBool ("hit fader", "GUI"))
|
||||
|
@ -174,9 +174,9 @@ namespace MWGui
|
|||
, mPlayerMajorSkills()
|
||||
, mPlayerMinorSkills()
|
||||
, mPlayerSkillValues()
|
||||
, mGui(NULL)
|
||||
, mGui(nullptr)
|
||||
, mGuiModes()
|
||||
, mCursorManager(NULL)
|
||||
, mCursorManager(nullptr)
|
||||
, mGarbageDialogs()
|
||||
, mShown(GW_ALL)
|
||||
, mForceHidden(GW_None)
|
||||
|
@ -505,7 +505,7 @@ namespace MWGui
|
|||
setCursorVisible(!gameMode);
|
||||
|
||||
if (gameMode)
|
||||
setKeyFocusWidget (NULL);
|
||||
setKeyFocusWidget (nullptr);
|
||||
|
||||
if (!mGuiEnabled)
|
||||
{
|
||||
|
@ -1179,7 +1179,7 @@ namespace MWGui
|
|||
return; //the cursor manager doesn't want any more info about this cursor
|
||||
//See if we can get the information we need out of the cursor resource
|
||||
ResourceImageSetPointerFix* imgSetPtr = dynamic_cast<ResourceImageSetPointerFix*>(MyGUI::PointerManager::getInstance().getByName(name));
|
||||
if(imgSetPtr != NULL)
|
||||
if(imgSetPtr != nullptr)
|
||||
{
|
||||
MyGUI::ResourceImageSet* imgSet = imgSetPtr->getImageSet();
|
||||
|
||||
|
@ -1555,7 +1555,7 @@ namespace MWGui
|
|||
// Remove this method for MyGUI 3.2.2
|
||||
void WindowManager::setKeyFocusWidget(MyGUI::Widget *widget)
|
||||
{
|
||||
if (widget == NULL)
|
||||
if (widget == nullptr)
|
||||
MyGUI::InputManager::getInstance().resetKeyFocusWidget();
|
||||
else
|
||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(widget);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||
|
||||
mPinButton->eventMouseButtonPressed += MyGUI::newDelegate(this, &WindowPinnableBase::onPinButtonPressed);
|
||||
|
||||
MyGUI::Button* button = NULL;
|
||||
MyGUI::Button* button = nullptr;
|
||||
MyGUI::VectorWidgetPtr widgets = window->getSkinWidgetsByName("Action");
|
||||
for (MyGUI::VectorWidgetPtr::iterator it = widgets.begin(); it != widgets.end(); ++it)
|
||||
{
|
||||
|
|
|
@ -42,10 +42,10 @@ namespace MWInput
|
|||
: mWindow(window)
|
||||
, mViewer(viewer)
|
||||
, mJoystickLastUsed(false)
|
||||
, mPlayer(NULL)
|
||||
, mPlayer(nullptr)
|
||||
, mEngine(engine)
|
||||
, mInputManager(NULL)
|
||||
, mVideoWrapper(NULL)
|
||||
, mInputManager(nullptr)
|
||||
, mVideoWrapper(nullptr)
|
||||
, mUserFile(userFile)
|
||||
, mDragDrop(false)
|
||||
, mGrabCursor (Settings::Manager::getBool("grab cursor", "Input"))
|
||||
|
@ -82,7 +82,7 @@ namespace MWInput
|
|||
Settings::Manager::getFloat("contrast", "Video"));
|
||||
|
||||
std::string file = userFileExists ? userFile : "";
|
||||
mInputBinder = new ICS::InputControlSystem(file, true, this, NULL, A_Last);
|
||||
mInputBinder = new ICS::InputControlSystem(file, true, this, nullptr, A_Last);
|
||||
|
||||
loadKeyDefaults();
|
||||
loadControllerDefaults();
|
||||
|
|
|
@ -1150,7 +1150,7 @@ namespace MWMechanics
|
|||
iter->second->getCharacterController()->updateContinuousVfx();
|
||||
|
||||
// Animation/movement update
|
||||
CharacterController* playerCharacter = NULL;
|
||||
CharacterController* playerCharacter = nullptr;
|
||||
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
||||
{
|
||||
if (iter->first != player &&
|
||||
|
@ -1505,7 +1505,7 @@ namespace MWMechanics
|
|||
for (; it != mActors.end(); ++it)
|
||||
{
|
||||
delete it->second;
|
||||
it->second = NULL;
|
||||
it->second = nullptr;
|
||||
}
|
||||
mActors.clear();
|
||||
mDeathCount.clear();
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace MWMechanics
|
|||
mFollowTarget(false),
|
||||
mCombatMove(false),
|
||||
mLastTargetPos(0,0,0),
|
||||
mCell(NULL),
|
||||
mCell(nullptr),
|
||||
mCurrentAction(),
|
||||
mActionCooldown(0),
|
||||
mStrength(),
|
||||
|
@ -284,7 +284,7 @@ namespace MWMechanics
|
|||
currentAction->getCombatRange(rangeAttack, rangeFollow);
|
||||
|
||||
// FIXME: consider moving this stuff to ActionWeapon::getCombatRange
|
||||
const ESM::Weapon *weapon = NULL;
|
||||
const ESM::Weapon *weapon = nullptr;
|
||||
MWMechanics::WeaponType weaptype = WeapType_None;
|
||||
float weapRange = 1.0f;
|
||||
|
||||
|
@ -650,7 +650,7 @@ ESM::Weapon::AttackType chooseBestAttack(const ESM::Weapon* weapon, MWMechanics:
|
|||
{
|
||||
ESM::Weapon::AttackType attackType;
|
||||
|
||||
if (weapon == NULL)
|
||||
if (weapon == nullptr)
|
||||
{
|
||||
//hand-to-hand deal equal damage for each type
|
||||
float roll = Misc::Rng::rollClosedProbability();
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace MWMechanics
|
|||
|
||||
bool empty() const
|
||||
{
|
||||
return mStorage == NULL;
|
||||
return mStorage == nullptr;
|
||||
}
|
||||
|
||||
const std::type_info& getType() const
|
||||
|
@ -68,7 +68,7 @@ namespace MWMechanics
|
|||
}
|
||||
|
||||
|
||||
DerivedClassStorage():mStorage(NULL){}
|
||||
DerivedClassStorage():mStorage(nullptr){}
|
||||
~DerivedClassStorage()
|
||||
{
|
||||
if(mStorage)
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace MWMechanics
|
|||
mReaction(0),
|
||||
mSaidGreeting(AiWander::Greet_None),
|
||||
mGreetingTimer(0),
|
||||
mCell(NULL),
|
||||
mCell(nullptr),
|
||||
mChooseAction(true),
|
||||
mIdleNow(false),
|
||||
mMoveNow(false),
|
||||
|
|
|
@ -712,7 +712,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|||
CharacterController::~CharacterController()
|
||||
{
|
||||
if (mAnimation)
|
||||
mAnimation->setTextKeyListener(NULL);
|
||||
mAnimation->setTextKeyListener(nullptr);
|
||||
}
|
||||
|
||||
void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||
|
@ -1914,7 +1914,7 @@ void CharacterController::skipAnim()
|
|||
|
||||
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
||||
{
|
||||
if(mAnimation == NULL)
|
||||
if(mAnimation == nullptr)
|
||||
return false;
|
||||
return mAnimation->isPlaying(groupName);
|
||||
}
|
||||
|
@ -2102,9 +2102,9 @@ void CharacterController::updateHeadTracking(float duration)
|
|||
if (MWRender::Animation* anim = MWBase::Environment::get().getWorld()->getAnimation(mHeadTrackTarget))
|
||||
{
|
||||
const osg::Node* node = anim->getNode("Head");
|
||||
if (node == NULL)
|
||||
if (node == nullptr)
|
||||
node = anim->getNode("Bip01 Head");
|
||||
if (node != NULL)
|
||||
if (node != nullptr)
|
||||
{
|
||||
osg::MatrixList mats = node->getWorldMatrices();
|
||||
if (mats.size())
|
||||
|
|
|
@ -203,8 +203,8 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
|||
void playRandomDeath(float startpoint = 0.0f);
|
||||
|
||||
/// choose a random animation group with \a prefix and numeric suffix
|
||||
/// @param num if non-NULL, the chosen animation number will be written here
|
||||
std::string chooseRandomGroup (const std::string& prefix, int* num = NULL);
|
||||
/// @param num if non-nullptr, the chosen animation number will be written here
|
||||
std::string chooseRandomGroup (const std::string& prefix, int* num = nullptr);
|
||||
|
||||
bool updateCarriedLeftVisible(WeaponType weaptype) const;
|
||||
|
||||
|
|
|
@ -216,12 +216,12 @@ namespace MWMechanics
|
|||
|
||||
float baseMagicka = fPCbaseMagickaMult * creatureStats.getAttribute(ESM::Attribute::Intelligence).getBase();
|
||||
bool reachedLimit = false;
|
||||
const ESM::Spell* weakestSpell = NULL;
|
||||
const ESM::Spell* weakestSpell = nullptr;
|
||||
int minCost = INT_MAX;
|
||||
|
||||
std::vector<std::string> selectedSpells;
|
||||
|
||||
const ESM::Race* race = NULL;
|
||||
const ESM::Race* race = nullptr;
|
||||
if (mRaceSelected)
|
||||
race = esmStore.get<ESM::Race>().find(player->mRace);
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Objects::~Objects()
|
|||
for (; it != mObjects.end();++it)
|
||||
{
|
||||
delete it->second;
|
||||
it->second = NULL;
|
||||
it->second = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace MWMechanics
|
|||
bool closed = true);
|
||||
|
||||
/// Returns door pointer within range. No guarentee is given as too which one
|
||||
/** \return Pointer to the door, or NULL if none exists **/
|
||||
/** \return Pointer to the door, or nullptr if none exists **/
|
||||
MWWorld::Ptr getNearbyDoor(const MWWorld::Ptr& actor,
|
||||
float minSqr = MIN_DIST_TO_DOOR_SQUARED,
|
||||
bool closed = true);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue