Commit e06f0b79 authored by Andrei Kortunov's avatar Andrei Kortunov

Replace all NULLs to nullptr

parent 6540ef68
......@@ -22,7 +22,7 @@ CS::Editor::Editor (int argc, char **argv)
: mSettingsState (mCfgMgr), mDocumentManager (mCfgMgr),
mViewManager (mDocumentManager), mPid(""),
mLock(), mMerge (mDocumentManager),
mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL)
mIpcServerName ("org.openmw.OpenCS"), mServer(nullptr), mClientSocket(nullptr)
{
std::pair<Files::PathContainer, std::vector<std::string> > config = readConfig();
......@@ -339,7 +339,7 @@ bool CS::Editor::makeIPCServer()
}
mServer->close();
mServer = NULL;
mServer = nullptr;
return false;
}
......
......@@ -3,7 +3,7 @@
#include "operation.hpp"
CSMDoc::OperationHolder::OperationHolder (Operation *operation)
: mOperation(NULL)
: mOperation(nullptr)
, mRunning (false)
{
if (operation)
......
......@@ -318,7 +318,7 @@ namespace CSMWorld
QVariant BodyPartRaceColumn::get(const Record<ESM::BodyPart> &record) const
{
if (mMeshType != NULL && mMeshType->get(record) == ESM::BodyPart::MT_Skin)
if (mMeshType != nullptr && mMeshType->get(record) == ESM::BodyPart::MT_Skin)
{
return QString::fromUtf8(record.get().mRace.c_str());
}
......
......@@ -244,7 +244,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");
}
......
......@@ -92,7 +92,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)
......
......@@ -18,7 +18,7 @@ namespace
void CSMWorld::IdTableProxyModel::updateColumnMap()
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
mColumnMap.clear();
if (mFilter)
......@@ -33,7 +33,7 @@ void CSMWorld::IdTableProxyModel::updateColumnMap()
bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex& sourceParent)
const
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
// It is not possible to use filterAcceptsColumn() and check for
// sourceModel()->headerData (sourceColumn, Qt::Horizontal, CSMWorld::ColumnBase::Role_Flags)
......@@ -51,14 +51,14 @@ bool CSMWorld::IdTableProxyModel::filterAcceptsRow (int sourceRow, const QModelI
CSMWorld::IdTableProxyModel::IdTableProxyModel (QObject *parent)
: QSortFilterProxyModel (parent),
mSourceModel(NULL)
mSourceModel(nullptr)
{
setSortCaseSensitivity (Qt::CaseInsensitive);
}
QModelIndex CSMWorld::IdTableProxyModel::getModelIndex (const std::string& id, int column) const
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
return mapFromSource(mSourceModel->getModelIndex (id, column));
}
......@@ -113,7 +113,7 @@ bool CSMWorld::IdTableProxyModel::lessThan(const QModelIndex &left, const QModel
QString CSMWorld::IdTableProxyModel::getRecordId(int sourceRow) const
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
int idColumn = mSourceModel->findColumnIndex(Columns::ColumnId_Id);
return mSourceModel->data(mSourceModel->index(sourceRow, idColumn)).toString();
......
......@@ -28,7 +28,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
{
IdTableProxyModel::setSourceModel(sourceModel);
if (mSourceModel != NULL)
if (mSourceModel != nullptr)
{
mInfoColumnIndex = mSourceModel->findColumnIndex(mInfoColumnId);
mFirstRowCache.clear();
......@@ -37,7 +37,7 @@ void CSMWorld::InfoTableProxyModel::setSourceModel(QAbstractItemModel *sourceMod
bool CSMWorld::InfoTableProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
QModelIndex first = mSourceModel->index(getFirstInfoRow(left.row()), left.column());
QModelIndex second = mSourceModel->index(getFirstInfoRow(right.row()), right.column());
......@@ -52,7 +52,7 @@ bool CSMWorld::InfoTableProxyModel::lessThan(const QModelIndex &left, const QMod
int CSMWorld::InfoTableProxyModel::getFirstInfoRow(int currentRow) const
{
Q_ASSERT(mSourceModel != NULL);
Q_ASSERT(mSourceModel != nullptr);
int row = currentRow;
int column = mInfoColumnIndex;
......
......@@ -453,13 +453,13 @@ void CSMWorld::ContainerRefIdAdapter::setData (const RefIdColumn *column, RefIdD
CSMWorld::CreatureColumns::CreatureColumns (const ActorColumns& actorColumns)
: ActorColumns (actorColumns),
mType(NULL),
mScale(NULL),
mOriginal(NULL),
mAttributes(NULL),
mAttacks(NULL),
mMisc(NULL),
mBloodType(NULL)
mType(nullptr),
mScale(nullptr),
mOriginal(nullptr),
mAttributes(nullptr),
mAttacks(nullptr),
mMisc(nullptr),
mBloodType(nullptr)
{}
CSMWorld::CreatureRefIdAdapter::CreatureRefIdAdapter (const CreatureColumns& columns)
......@@ -748,16 +748,16 @@ 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),
mBloodType(NULL),
mGender(NULL)
mRace(nullptr),
mClass(nullptr),
mFaction(nullptr),
mHair(nullptr),
mHead(nullptr),
mAttributes(nullptr),
mSkills(nullptr),
mMisc(nullptr),
mBloodType(nullptr),
mGender(nullptr)
{}
CSMWorld::NpcRefIdAdapter::NpcRefIdAdapter (const NpcColumns& columns)
......
......@@ -3,7 +3,7 @@
#include <stdexcept>
CSMWorld::ResourcesManager::ResourcesManager()
: mVFS(NULL)
: mVFS(nullptr)
{
}
......
......@@ -189,7 +189,7 @@ void CSVDoc::FileDialog::slotRejected()
if(mFileWidget)
{
delete mFileWidget;
mFileWidget = NULL;
mFileWidget = nullptr;
}
close();
}
......@@ -200,7 +200,7 @@ void CSVDoc::FileDialog::slotNewFile()
if(mFileWidget)
{
delete mFileWidget;
mFileWidget = NULL;
mFileWidget = nullptr;
}
disconnect (ui.projectButtonBox, SIGNAL (accepted()), this, SLOT (slotNewFile()));
close();
......
......@@ -64,7 +64,7 @@ namespace CSVDoc
void updateTitle();
void updateSubViewIndices (SubView *view = NULL);
void updateSubViewIndices (SubView *view = nullptr);
void universalIdChanged (const CSMWorld::UniversalId& universalId);
......
......@@ -400,7 +400,7 @@ void CSVDoc::View::updateSubViewIndices(SubView *view)
else
{
delete subView->titleBarWidget();
subView->setTitleBarWidget (NULL);
subView->setTitleBarWidget (nullptr);
}
}
}
......@@ -429,7 +429,7 @@ void CSVDoc::View::updateActions()
CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews)
: mViewManager (viewManager), mDocument (document), mViewIndex (totalViews-1),
mViewTotal (totalViews), mScroll(NULL), mScrollbarOnly(false)
mViewTotal (totalViews), mScroll(nullptr), mScrollbarOnly(false)
{
CSMPrefs::Category& windows = CSMPrefs::State::get()["Windows"];
......@@ -563,7 +563,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);
......@@ -631,7 +631,7 @@ void CSVDoc::View::moveScrollBarToEnd(int min, int max)
void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
{
if (*setting=="Windows/hide-subview")
updateSubViewIndices (NULL);
updateSubViewIndices (nullptr);
else if (*setting=="Windows/mainwindow-scrollbar")
{
if (setting->toString()!="Grow Only")
......@@ -659,7 +659,7 @@ void CSVDoc::View::settingChanged (const CSMPrefs::Setting *setting)
mScroll->takeWidget();
setCentralWidget (&mSubViewWindow);
mScroll->deleteLater();
mScroll = NULL;
mScroll = nullptr;
}
}
}
......
......@@ -149,7 +149,7 @@ namespace CSVDoc
void updateTitle();
// called when subviews are added or removed
void updateSubViewIndices (SubView *view = NULL);
void updateSubViewIndices (SubView *view = nullptr);
private slots:
......
......@@ -38,7 +38,7 @@ namespace CSVRender
, mCameraSensitivity(1/650.f)
, mSecondaryMoveMult(50)
, mWheelMoveMult(8)
, mCamera(NULL)
, mCamera(nullptr)
{
}
......@@ -81,7 +81,7 @@ namespace CSVRender
bool wasActive = mActive;
mCamera = camera;
mActive = (mCamera != NULL);
mActive = (mCamera != nullptr);
if (mActive != wasActive)
{
......
......@@ -86,7 +86,7 @@ void CSVRender::Object::update()
const int ModelIndex = referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model);
int index = referenceables.searchId (mReferenceableId);
const ESM::Light* light = NULL;
const ESM::Light* light = nullptr;
mBaseNode->removeChildren(0, mBaseNode->getNumChildren());
......
......@@ -527,7 +527,7 @@ void CSVRender::PagedWorldspaceWidget::addCellToSceneFromCamera (int offsetX, in
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);
......
......@@ -185,7 +185,7 @@ SceneWidget::SceneWidget(std::shared_ptr<Resource::ResourceSystem> resourceSyste
bool retrieveInput)
: RenderWidget(parent, f)
, mResourceSystem(resourceSystem)
, mLighting(NULL)
, mLighting(nullptr)
, mHasDefaultAmbient(false)
, mPrevMouseX(0)
, mPrevMouseY(0)
......@@ -425,21 +425,21 @@ void SceneWidget::selectNavigationMode (const std::string& mode)
{
if (mode=="1st")
{
mCurrentCamControl->setCamera(NULL);
mCurrentCamControl->setCamera(nullptr);
mCurrentCamControl = mFreeCamControl;
mFreeCamControl->setCamera(getCamera());
mFreeCamControl->fixUpAxis(CameraController::WorldUp);
}
else if (mode=="free")
{
mCurrentCamControl->setCamera(NULL);
mCurrentCamControl->setCamera(nullptr);
mCurrentCamControl = mFreeCamControl;
mFreeCamControl->setCamera(getCamera());
mFreeCamControl->unfixUpAxis();
}
else if (mode=="orbit")
{
mCurrentCamControl->setCamera(NULL);
mCurrentCamControl->setCamera(nullptr);
mCurrentCamControl = mOrbitCamControl;
mOrbitCamControl->setCamera(getCamera());
mOrbitCamControl->reset();
......
......@@ -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(CSMWorld::Land::createUniqueRecordId(cellX, cellY));
if (index == -1)
return NULL;
return nullptr;
const ESM::Land& land = mData.getLand().getRecord(index).get();
return new ESMTerrain::LandObject(&land, ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VTEX);
......
......@@ -45,7 +45,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;
}
......
......@@ -25,7 +25,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);
......
......@@ -158,7 +158,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())
{
......@@ -251,11 +251,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),
......@@ -325,7 +325,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);
......@@ -339,7 +339,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();
}
......@@ -360,11 +360,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();
}
......@@ -436,7 +436,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)
......@@ -470,11 +470,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)
......@@ -733,7 +733,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;
......
......@@ -95,7 +95,7 @@ void CSVWorld::ExtendedCommandConfigurator::setupGroupLayout()
int divider = 1;
do
{
while (layout->itemAt(0) != NULL)
while (layout->itemAt(0) != nullptr)
{
layout->removeItem(layout->itemAt(0));
}
......
......@@ -25,7 +25,7 @@ QWidget *CSVWorld::IdCompletionDelegate::createEditor(QWidget *parent,
{
if (!index.data(Qt::EditRole).isValid() && !index.data(Qt::DisplayRole).isValid())
{
return NULL;
return nullptr;
}
// The completer for InfoCondVar needs to return a completer based on the first column
......
......@@ -23,9 +23,9 @@ CSVWorld::NestedTable::NestedTable(CSMDoc::Document& document,
bool editable,
bool fixedRows)
: DragRecordTable(document, parent),
mAddNewRowAction(NULL),
mRemoveRowAction(NULL),
mEditIdAction(NULL),
mAddNewRowAction(nullptr),
mRemoveRowAction(nullptr),
mEditIdAction(nullptr),
mModel(model)
{
mDispatcher = new CSMWorld::CommandDispatcher (document, id, this);
......
......@@ -38,7 +38,7 @@ namespace CSVWorld
NestedTable(CSMDoc::Document& document,
CSMWorld::UniversalId id,
CSMWorld::NestedTableProxyModel* model,
QWidget* parent = NULL,
QWidget* parent = nullptr,
bool editable = true,
bool fixedRows = false);
......
......@@ -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;
......@@ -35,7 +35,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()==ESM::CellId::sDefaultWorldspace)
......@@ -189,9 +189,9 @@ void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::CellSelection
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& universalIdData)
{
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 (universalIdData);
......
......@@ -129,7 +129,7 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
// Color columns use a custom editor, so we need to fetch selected color from it.
CSVWidget::ColorEditor *colorEditor = qobject_cast<CSVWidget::ColorEditor *>(editor);
if (colorEditor != NULL)
if (colorEditor != nullptr)
{
variant = colorEditor->colorInt();
}
......@@ -322,7 +322,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(variant.toInt());
return;
......
......@@ -20,14 +20,14 @@ void releaseArgv();
int Java_org_libsdl_app_SDLActivity_getMouseX(JNIEnv *env, jclass cls, jobject obj) {
int ret = 0;
SDL_GetMouseState(&ret, NULL);
SDL_GetMouseState(&ret, nullptr);
return ret;
}
int Java_org_libsdl_app_SDLActivity_getMouseY(JNIEnv *env, jclass cls, jobject obj) {
int ret = 0;
SDL_GetMouseState(NULL, &ret);
SDL_GetMouseState(nullptr, &ret);
return ret;
}
......
......@@ -197,9 +197,9 @@ bool OMW::Engine::frame(float frametime)
}
OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
: mWindow(NULL)
: mWindow(nullptr)
, mEncoding(ToUTF8::WINDOWS_1252)
, mEncoder(NULL)
, mEncoder(nullptr)