diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c19c57eb..1fefc673e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,7 +351,7 @@ endif() # CXX Compiler settings if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-reorder -std=c++98 -pedantic -Wno-long-long") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -std=c++98 -pedantic -Wno-long-long") if (CMAKE_CXX_COMPILER_ID STREQUAL Clang AND NOT APPLE) execute_process(COMMAND ${CMAKE_C_COMPILER} --version OUTPUT_VARIABLE CLANG_VERSION) diff --git a/apps/launcher/graphicspage.cpp b/apps/launcher/graphicspage.cpp index cdb51348c..5176d7fa0 100644 --- a/apps/launcher/graphicspage.cpp +++ b/apps/launcher/graphicspage.cpp @@ -36,13 +36,13 @@ QString getAspect(int x, int y) } Launcher::GraphicsPage::GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSetting, QWidget *parent) - : mOgre(NULL) + : QWidget(parent) + , mOgre(NULL) , mSelectedRenderSystem(NULL) , mOpenGLRenderSystem(NULL) , mDirect3DRenderSystem(NULL) , mCfgMgr(cfg) , mGraphicsSettings(graphicsSetting) - , QWidget(parent) { setObjectName ("GraphicsPage"); setupUi(this); diff --git a/apps/launcher/settingspage.cpp b/apps/launcher/settingspage.cpp index 34b4b41a9..843b51391 100644 --- a/apps/launcher/settingspage.cpp +++ b/apps/launcher/settingspage.cpp @@ -18,10 +18,10 @@ using namespace Process; Launcher::SettingsPage::SettingsPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings, Config::LauncherSettings &launcherSettings, MainDialog *parent) - : mCfgMgr(cfg) + : QWidget(parent) + , mCfgMgr(cfg) , mGameSettings(gameSettings) , mLauncherSettings(launcherSettings) - , QWidget(parent) , mMain(parent) { setupUi(this); diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 1d31c8396..53a9e9e83 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -23,8 +23,8 @@ CS::Editor::Editor (OgreInit::OgreInit& ogreInit) : mUserSettings (mCfgMgr), mOverlaySystem (0), mDocumentManager (mCfgMgr), - mViewManager (mDocumentManager), - mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL), mPid(""), mLock() + mViewManager (mDocumentManager), mPid(""), + mLock(), mIpcServerName ("org.openmw.OpenCS"), mServer(NULL), mClientSocket(NULL) { std::pair > config = readConfig(); diff --git a/apps/opencs/model/doc/document.cpp b/apps/opencs/model/doc/document.cpp index 31d0aaccd..a73201ec0 100644 --- a/apps/opencs/model/doc/document.cpp +++ b/apps/opencs/model/doc/document.cpp @@ -2251,11 +2251,12 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration, ToUTF8::FromType encoding, const CSMWorld::ResourcesManager& resourcesManager, const std::vector& blacklistedScripts) : mSavePath (savePath), mContentFiles (files), mNew (new_), mData (encoding, resourcesManager), - mTools (*this), mResDir(resDir), + mTools (*this), mProjectPath ((configuration.getUserDataPath() / "projects") / (savePath.filename().string() + ".project")), mSavingOperation (*this, mProjectPath, encoding), mSaving (&mSavingOperation), + mResDir(resDir), mRunner (mProjectPath), mPhysics(boost::shared_ptr()) { if (mContentFiles.empty()) diff --git a/apps/opencs/model/filter/valuenode.cpp b/apps/opencs/model/filter/valuenode.cpp index 6fdae3e1b..6fdb5cb02 100644 --- a/apps/opencs/model/filter/valuenode.cpp +++ b/apps/opencs/model/filter/valuenode.cpp @@ -9,7 +9,7 @@ CSMFilter::ValueNode::ValueNode (int columnId, Type lowerType, Type upperType, double lower, double upper) -: mColumnId (columnId), mLowerType (lowerType), mUpperType (upperType), mLower (lower), mUpper (upper){} +: mColumnId (columnId), mLower (lower), mUpper (upper), mLowerType (lowerType), mUpperType (upperType){} bool CSMFilter::ValueNode::test (const CSMWorld::IdTableBase& table, int row, const std::map& columns) const diff --git a/apps/opencs/model/settings/connector.cpp b/apps/opencs/model/settings/connector.cpp index 5e1d64544..3cf21123c 100644 --- a/apps/opencs/model/settings/connector.cpp +++ b/apps/opencs/model/settings/connector.cpp @@ -4,7 +4,7 @@ CSMSettings::Connector::Connector(CSVSettings::View *master, QObject *parent) - : mMasterView (master), QObject(parent) + : QObject(parent), mMasterView (master) {} void CSMSettings::Connector::addSlaveView (CSVSettings::View *view, diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index 5190aacd5..c0991a330 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -11,8 +11,8 @@ CSMTools::ReferenceableCheckStage::ReferenceableCheckStage( const CSMWorld::IdCollection& faction) : mReferencables(referenceable), - mClasses(classes), mRaces(races), + mClasses(classes), mFactions(faction), mPlayerPresent(false) { diff --git a/apps/opencs/model/tools/tools.cpp b/apps/opencs/model/tools/tools.cpp index 970a8ac4f..99e462b1d 100644 --- a/apps/opencs/model/tools/tools.cpp +++ b/apps/opencs/model/tools/tools.cpp @@ -103,8 +103,8 @@ CSMDoc::OperationHolder *CSMTools::Tools::getVerifier() } CSMTools::Tools::Tools (CSMDoc::Document& document) -: mDocument (document), mData (document.getData()), mVerifierOperation (0), mNextReportNumber (0), - mSearchOperation (0) +: mDocument (document), mData (document.getData()), mVerifierOperation (0), + mSearchOperation (0), mNextReportNumber (0) { // index 0: load error log mReports.insert (std::make_pair (mNextReportNumber++, new ReportModel)); diff --git a/apps/opencs/model/world/columnbase.cpp b/apps/opencs/model/world/columnbase.cpp index cf125aa63..53987b23c 100644 --- a/apps/opencs/model/world/columnbase.cpp +++ b/apps/opencs/model/world/columnbase.cpp @@ -3,7 +3,7 @@ #include "columns.hpp" CSMWorld::ColumnBase::ColumnBase (int columnId, Display displayType, int flags) - : mColumnId (columnId), mDisplayType (displayType), mFlags (flags) + : mColumnId (columnId), mFlags (flags), mDisplayType (displayType) {} CSMWorld::ColumnBase::~ColumnBase() {} diff --git a/apps/opencs/model/world/commanddispatcher.cpp b/apps/opencs/model/world/commanddispatcher.cpp index 2d3262487..b9d5bd7fe 100644 --- a/apps/opencs/model/world/commanddispatcher.cpp +++ b/apps/opencs/model/world/commanddispatcher.cpp @@ -83,7 +83,7 @@ std::vector CSMWorld::CommandDispatcher::getRevertableRecords() con CSMWorld::CommandDispatcher::CommandDispatcher (CSMDoc::Document& document, const CSMWorld::UniversalId& id, QObject *parent) -: QObject (parent), mDocument (document), mId (id), mLocked (false) +: QObject (parent), mLocked (false), mDocument (document), mId (id) {} void CSMWorld::CommandDispatcher::setEditLock (bool locked) diff --git a/apps/opencs/model/world/commands.cpp b/apps/opencs/model/world/commands.cpp index 9a0401081..fbb4de756 100644 --- a/apps/opencs/model/world/commands.cpp +++ b/apps/opencs/model/world/commands.cpp @@ -235,12 +235,12 @@ CSMWorld::DeleteNestedCommand::DeleteNestedCommand (IdTree& model, int nestedRow, int parentColumn, QUndoCommand* parent) : - mId(id), + QUndoCommand(parent), + NestedTableStoring(model, id, parentColumn), mModel(model), + mId(id), mParentColumn(parentColumn), - QUndoCommand(parent), - mNestedRow(nestedRow), - NestedTableStoring(model, id, parentColumn) + mNestedRow(nestedRow) { std::string title = model.headerData(parentColumn, Qt::Horizontal, Qt::DisplayRole).toString().toUtf8().constData(); @@ -263,12 +263,12 @@ void CSMWorld::DeleteNestedCommand::undo() } CSMWorld::AddNestedCommand::AddNestedCommand(IdTree& model, const std::string& id, int nestedRow, int parentColumn, QUndoCommand* parent) - : mModel(model), + : QUndoCommand(parent), + NestedTableStoring(model, id, parentColumn), + mModel(model), mId(id), mNewRow(nestedRow), - mParentColumn(parentColumn), - QUndoCommand(parent), - NestedTableStoring(model, id, parentColumn) + mParentColumn(parentColumn) { std::string title = model.headerData(parentColumn, Qt::Horizontal, Qt::DisplayRole).toString().toUtf8().constData(); diff --git a/apps/opencs/model/world/refidadapterimp.cpp b/apps/opencs/model/world/refidadapterimp.cpp index 98c1b6f0f..c784e14ce 100644 --- a/apps/opencs/model/world/refidadapterimp.cpp +++ b/apps/opencs/model/world/refidadapterimp.cpp @@ -13,7 +13,7 @@ CSMWorld::PotionColumns::PotionColumns (const InventoryColumns& columns) CSMWorld::PotionRefIdAdapter::PotionRefIdAdapter (const PotionColumns& columns, const RefIdColumn *autoCalc) : InventoryRefIdAdapter (UniversalId::Type_Potion, columns), - mAutoCalc (autoCalc), mColumns(columns) + mColumns(columns), mAutoCalc (autoCalc) {} QVariant CSMWorld::PotionRefIdAdapter::getData (const RefIdColumn *column, const RefIdData& data, diff --git a/apps/opencs/view/doc/filedialog.cpp b/apps/opencs/view/doc/filedialog.cpp index 1b3196112..eeec81109 100644 --- a/apps/opencs/view/doc/filedialog.cpp +++ b/apps/opencs/view/doc/filedialog.cpp @@ -18,7 +18,7 @@ #include "adjusterwidget.hpp" CSVDoc::FileDialog::FileDialog(QWidget *parent) : - QDialog(parent), mSelector (0), mFileWidget (0), mAdjusterWidget (0), mDialogBuilt(false), mAction(ContentAction_Undefined) + QDialog(parent), mSelector (0), mAction(ContentAction_Undefined), mFileWidget (0), mAdjusterWidget (0), mDialogBuilt(false) { ui.setupUi (this); resize(400, 400); diff --git a/apps/opencs/view/render/cell.cpp b/apps/opencs/view/render/cell.cpp index a030ea11f..99658e1c8 100644 --- a/apps/opencs/view/render/cell.cpp +++ b/apps/opencs/view/render/cell.cpp @@ -55,7 +55,7 @@ bool CSVRender::Cell::addObjects (int start, int end) CSVRender::Cell::Cell (CSMWorld::Data& data, Ogre::SceneManager *sceneManager, const std::string& id, boost::shared_ptr physics, const Ogre::Vector3& origin) -: mData (data), mId (Misc::StringUtils::lowerCase (id)), mSceneMgr(sceneManager), mPhysics(physics), mX(0), mY(0) +: mData (data), mId (Misc::StringUtils::lowerCase (id)), mPhysics(physics), mSceneMgr(sceneManager), mX(0), mY(0) { mCellNode = sceneManager->getRootSceneNode()->createChildSceneNode(); mCellNode->setPosition (origin); diff --git a/apps/opencs/view/render/mousestate.cpp b/apps/opencs/view/render/mousestate.cpp index a94f4f8ab..206820194 100644 --- a/apps/opencs/view/render/mousestate.cpp +++ b/apps/opencs/view/render/mousestate.cpp @@ -56,11 +56,11 @@ namespace CSVRender // MouseState::MouseState(WorldspaceWidget *parent) - : mParent(parent), mPhysics(parent->mDocument.getPhysics()), mSceneManager(parent->getSceneManager()) - , mCurrentObj(""), mMouseState(Mouse_Default), mOldPos(0,0), mMouseEventTimer(0), mPlane(0) - , mGrabbedSceneNode(""), mOrigObjPos(Ogre::Vector3()), mOrigMousePos(Ogre::Vector3()) - , mCurrentMousePos(Ogre::Vector3()), mOffset(0.0f) - , mColIndexPosX(0), mColIndexPosY(0), mColIndexPosZ(0), mIdTableModel(0) + : mMouseState(Mouse_Default), mParent(parent), mPhysics(parent->mDocument.getPhysics()) + , mSceneManager(parent->getSceneManager()), mOldPos(0,0), mCurrentObj(""), mGrabbedSceneNode("") + , mMouseEventTimer(0), mPlane(0), mOrigObjPos(Ogre::Vector3()), mOrigMousePos(Ogre::Vector3()) + , mCurrentMousePos(Ogre::Vector3()), mOffset(0.0f), mIdTableModel(0), mColIndexPosX(0) + , mColIndexPosY(0), mColIndexPosZ(0) { const CSMWorld::RefCollection& references = mParent->mDocument.getData().getReferences(); diff --git a/apps/opencs/view/render/textoverlay.cpp b/apps/opencs/view/render/textoverlay.cpp index 656ea959c..c41d5f318 100644 --- a/apps/opencs/view/render/textoverlay.cpp +++ b/apps/opencs/view/render/textoverlay.cpp @@ -27,8 +27,8 @@ namespace CSVRender // http://www.ogre3d.org/tikiwiki/Creating+dynamic+textures // http://www.ogre3d.org/tikiwiki/ManualObject TextOverlay::TextOverlay(const Ogre::MovableObject* obj, const Ogre::Camera* camera, const Ogre::String& id) - : mOverlay(0), mCaption(""), mDesc(""), mEnabled(true), mCamera(camera), mObj(obj), mId(id) - , mOnScreen(false) , mInstance(0), mFontHeight(16) // FIXME: make font height configurable + : mOverlay(0), mCaption(""), mDesc(""), mObj(obj), mCamera(camera), mFontHeight(16), mId(id) + , mEnabled(true), mOnScreen(false), mInstance(0) // FIXME: make font height configurable { if(id == "" || !camera || !obj) throw std::runtime_error("TextOverlay could not be created."); diff --git a/apps/opencs/view/render/worldspacewidget.cpp b/apps/opencs/view/render/worldspacewidget.cpp index e3e5ce50e..e88814818 100644 --- a/apps/opencs/view/render/worldspacewidget.cpp +++ b/apps/opencs/view/render/worldspacewidget.cpp @@ -22,7 +22,7 @@ #include "editmode.hpp" CSVRender::WorldspaceWidget::WorldspaceWidget (CSMDoc::Document& document, QWidget* parent) -: SceneWidget (parent), mDocument(document), mSceneElements(0), mRun(0), mPhysics(boost::shared_ptr()), mMouse(0), +: SceneWidget (parent), mSceneElements(0), mRun(0), mDocument(document), mPhysics(boost::shared_ptr()), mMouse(0), mInteractionMask (0) { setAcceptDrops(true); diff --git a/apps/opencs/view/settings/booleanview.cpp b/apps/opencs/view/settings/booleanview.cpp index 29f9775af..8c759cabb 100644 --- a/apps/opencs/view/settings/booleanview.cpp +++ b/apps/opencs/view/settings/booleanview.cpp @@ -12,7 +12,7 @@ CSVSettings::BooleanView::BooleanView (CSMSettings::Setting *setting, Page *parent) - : mType(setting->type()), View (setting, parent) + : View (setting, parent), mType(setting->type()) { foreach (const QString &value, setting->declaredValues()) { diff --git a/apps/opencs/view/settings/dialog.cpp b/apps/opencs/view/settings/dialog.cpp index 0b1231266..e8832e2bc 100644 --- a/apps/opencs/view/settings/dialog.cpp +++ b/apps/opencs/view/settings/dialog.cpp @@ -23,7 +23,7 @@ #include CSVSettings::Dialog::Dialog(QMainWindow *parent) - : mStackedWidget (0), mDebugMode (false), SettingWindow (parent) + : SettingWindow (parent), mStackedWidget (0), mDebugMode (false) { setWindowTitle(QString::fromUtf8 ("User Settings")); diff --git a/apps/opencs/view/settings/frame.cpp b/apps/opencs/view/settings/frame.cpp index 32e094274..454d3fefa 100644 --- a/apps/opencs/view/settings/frame.cpp +++ b/apps/opencs/view/settings/frame.cpp @@ -7,8 +7,8 @@ const QString CSVSettings::Frame::sInvisibleBoxStyle = CSVSettings::Frame::Frame (bool isVisible, const QString &title, QWidget *parent) - : mIsHorizontal (true), mLayout (new SettingLayout()), - QGroupBox (title, parent) + : QGroupBox (title, parent), mIsHorizontal (true), + mLayout (new SettingLayout()) { setFlat (true); mVisibleBoxStyle = styleSheet(); diff --git a/apps/opencs/view/settings/listview.cpp b/apps/opencs/view/settings/listview.cpp index 36cdbb0ae..0876b3982 100644 --- a/apps/opencs/view/settings/listview.cpp +++ b/apps/opencs/view/settings/listview.cpp @@ -7,7 +7,7 @@ CSVSettings::ListView::ListView(CSMSettings::Setting *setting, Page *parent) - : mComboBox (0), mAbstractItemView (0), View(setting, parent) + : View(setting, parent), mAbstractItemView (0), mComboBox (0) { QWidget *widget = buildWidget(setting->isMultiLine(), setting->widgetWidth()); diff --git a/apps/opencs/view/settings/page.cpp b/apps/opencs/view/settings/page.cpp index e846840b8..c009cdd7a 100644 --- a/apps/opencs/view/settings/page.cpp +++ b/apps/opencs/view/settings/page.cpp @@ -19,7 +19,7 @@ QMap CSVSettings::Page::Page (const QString &pageName, QList settingList, SettingWindow *parent, const QString& label) -: mParent(parent), mIsEditorPage (false), Frame(false, "", parent), mLabel (label) +: Frame(false, "", parent), mParent(parent), mIsEditorPage (false), mLabel (label) { setObjectName (pageName); diff --git a/apps/opencs/view/settings/spinbox.cpp b/apps/opencs/view/settings/spinbox.cpp index c70fc36d1..043107bb7 100644 --- a/apps/opencs/view/settings/spinbox.cpp +++ b/apps/opencs/view/settings/spinbox.cpp @@ -3,7 +3,7 @@ #include CSVSettings::SpinBox::SpinBox(QWidget *parent) - : mValueList(QStringList()), QSpinBox(parent) + : QSpinBox(parent), mValueList(QStringList()) { setRange (0, 0); } diff --git a/apps/opencs/view/settings/view.cpp b/apps/opencs/view/settings/view.cpp index 39c7f89b2..21cf55fdd 100644 --- a/apps/opencs/view/settings/view.cpp +++ b/apps/opencs/view/settings/view.cpp @@ -12,12 +12,12 @@ CSVSettings::View::View(CSMSettings::Setting *setting, Page *parent) - : mDataModel(0), mParentPage (parent), + : Frame(true, setting->getLabel(), parent), + mParentPage (parent), mDataModel(0), mHasFixedValues (!setting->declaredValues().isEmpty()), mIsMultiValue (setting->isMultiValue()), mViewKey (setting->page() + '/' + setting->name()), - mSerializable (setting->serializable()), - Frame(true, setting->getLabel(), parent) + mSerializable (setting->serializable()) { if (!setting->getToolTip().isEmpty()) setToolTip (setting->getToolTip()); diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index 0d0e82dbf..647accd4c 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -356,15 +356,15 @@ CSVWorld::EditWidget::~EditWidget() CSVWorld::EditWidget::EditWidget(QWidget *parent, int row, CSMWorld::IdTable* table, CSMWorld::CommandDispatcher& commandDispatcher, CSMDoc::Document& document, bool createAndDelete) : -mDispatcher(this, table, commandDispatcher, document), -mNestedTableDispatcher(NULL), QScrollArea(parent), mWidgetMapper(NULL), mNestedTableMapper(NULL), +mDispatcher(this, table, commandDispatcher, document), +mNestedTableDispatcher(NULL), mMainWidget(NULL), +mTable(table), mCommandDispatcher (commandDispatcher), -mDocument (document), -mTable(table) +mDocument (document) { remake (row); @@ -571,8 +571,8 @@ CSVWorld::DialogueSubView::DialogueSubView (const CSMWorld::UniversalId& id, CSM SubView (id), mEditWidget(0), mMainLayout(NULL), - mUndoStack(document.getUndoStack()), mTable(dynamic_cast(document.getData().getTableModel(id))), + mUndoStack(document.getUndoStack()), mLocked(false), mDocument(document), mCommandDispatcher (document, CSMWorld::UniversalId::getParentType (id.getType())) diff --git a/apps/opencs/view/world/dragrecordtable.cpp b/apps/opencs/view/world/dragrecordtable.cpp index f45c45809..7032fee6d 100644 --- a/apps/opencs/view/world/dragrecordtable.cpp +++ b/apps/opencs/view/world/dragrecordtable.cpp @@ -17,8 +17,8 @@ void CSVWorld::DragRecordTable::startDragFromTable (const CSVWorld::DragRecordTa } CSVWorld::DragRecordTable::DragRecordTable (CSMDoc::Document& document, QWidget* parent) : -mDocument(document), QTableView(parent), +mDocument(document), mEditLock(false) {} diff --git a/apps/opencs/view/world/genericcreator.cpp b/apps/opencs/view/world/genericcreator.cpp index 4269679bf..a123e127f 100644 --- a/apps/opencs/view/world/genericcreator.cpp +++ b/apps/opencs/view/world/genericcreator.cpp @@ -129,9 +129,9 @@ void CSVWorld::GenericCreator::addScope (const QString& name, CSMWorld::Scope sc CSVWorld::GenericCreator::GenericCreator (CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id, bool relaxedIdRules) -: mData (data), mUndoStack (undoStack), mListId (id), mLocked (false), mCloneMode (false), +: mData (data), mUndoStack (undoStack), mListId (id), mLocked (false), mClonedType (CSMWorld::UniversalId::Type_None), mScopes (CSMWorld::Scope_Content), mScope (0), - mScopeLabel (0) + mScopeLabel (0), mCloneMode (false) { mLayout = new QHBoxLayout; mLayout->setContentsMargins (0, 0, 0, 0); diff --git a/apps/opencs/view/world/scenesubview.cpp b/apps/opencs/view/world/scenesubview.cpp index 3fdf2f6e5..aa2161259 100644 --- a/apps/opencs/view/world/scenesubview.cpp +++ b/apps/opencs/view/world/scenesubview.cpp @@ -27,7 +27,7 @@ #include "creator.hpp" CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document) -: SubView (id), mLayout(new QHBoxLayout), mDocument(document), mScene(NULL), mToolbar(NULL) +: SubView (id), mScene(NULL), mLayout(new QHBoxLayout), mDocument(document), mToolbar(NULL) { QVBoxLayout *layout = new QVBoxLayout; diff --git a/apps/opencs/view/world/scriptedit.cpp b/apps/opencs/view/world/scriptedit.cpp index 2e05fa110..2f0d82ae1 100644 --- a/apps/opencs/view/world/scriptedit.cpp +++ b/apps/opencs/view/world/scriptedit.cpp @@ -42,13 +42,14 @@ bool CSVWorld::ScriptEdit::event (QEvent *event) CSVWorld::ScriptEdit::ScriptEdit (const CSMDoc::Document& document, ScriptHighlighter::Mode mode, QWidget* parent) : QPlainTextEdit (parent), - mDocument (document), - mWhiteListQoutes("^[a-z|_]{1}[a-z|0-9|_]{0,}$", Qt::CaseInsensitive), mChangeLocked (0), - mLineNumberArea(0), mShowLineNum(false), + mLineNumberArea(0), mDefaultFont(font()), - mMonoFont(QFont("Monospace")) + mMonoFont(QFont("Monospace")), + mDocument (document), + mWhiteListQoutes("^[a-z|_]{1}[a-z|0-9|_]{0,}$", Qt::CaseInsensitive) + { // setAcceptRichText (false); setLineWrapMode (QPlainTextEdit::NoWrap); diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 86daf8af7..b8972edbe 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -253,8 +253,8 @@ void CSVWorld::Table::mouseDoubleClickEvent (QMouseEvent *event) CSVWorld::Table::Table (const CSMWorld::UniversalId& id, bool createAndDelete, bool sorting, CSMDoc::Document& document) -: mCreateAction (0), mCloneAction(0), mRecordStatusDisplay (0), - DragRecordTable(document) +: DragRecordTable(document), mCreateAction (0), + mCloneAction(0),mRecordStatusDisplay (0) { CSMSettings::UserSettings &settings = CSMSettings::UserSettings::instance(); QString jumpSetting = settings.settingValue ("table-input/jump-to-added"); diff --git a/apps/openmw/mwbase/environment.cpp b/apps/openmw/mwbase/environment.cpp index 3bc15746e..a90eec5bf 100644 --- a/apps/openmw/mwbase/environment.cpp +++ b/apps/openmw/mwbase/environment.cpp @@ -17,8 +17,8 @@ MWBase::Environment *MWBase::Environment::sThis = 0; MWBase::Environment::Environment() : mWorld (0), mSoundManager (0), mScriptManager (0), mWindowManager (0), - mMechanicsManager (0), mDialogueManager (0), mJournal (0), mInputManager (0), mFrameDuration (0), - mStateManager (0) + mMechanicsManager (0), mDialogueManager (0), mJournal (0), mInputManager (0), mStateManager (0), + mFrameDuration (0) { assert (!sThis); sThis = this; diff --git a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp index 0b9fd65d2..1785575fc 100644 --- a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp +++ b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp @@ -48,12 +48,15 @@ namespace MWDialogue { DialogueManager::DialogueManager (const Compiler::Extensions& extensions, bool scriptVerbose, Translation::Storage& translationDataStorage) : - mCompilerContext (MWScript::CompilerContext::Type_Dialogue), - mErrorStream(std::cout.rdbuf()),mErrorHandler(mErrorStream) - , mTemporaryDispositionChange(0.f) - , mPermanentDispositionChange(0.f), mScriptVerbose (scriptVerbose) - , mTranslationDataStorage(translationDataStorage) + mTranslationDataStorage(translationDataStorage) + , mCompilerContext (MWScript::CompilerContext::Type_Dialogue) + , mErrorStream(std::cout.rdbuf()) + , mErrorHandler(mErrorStream) , mTalkedTo(false) + , mTemporaryDispositionChange(0.f) + , mPermanentDispositionChange(0.f) + , mScriptVerbose (scriptVerbose) + { mChoice = -1; mIsInChoice = false; diff --git a/apps/openmw/mwgui/alchemywindow.cpp b/apps/openmw/mwgui/alchemywindow.cpp index b28e4de09..a54744370 100644 --- a/apps/openmw/mwgui/alchemywindow.cpp +++ b/apps/openmw/mwgui/alchemywindow.cpp @@ -26,10 +26,10 @@ namespace MWGui { AlchemyWindow::AlchemyWindow() : WindowBase("openmw_alchemy_window.layout") - , mApparatus (4) - , mIngredients (4) , mSortModel(NULL) , mAlchemy(new MWMechanics::Alchemy()) + , mApparatus (4) + , mIngredients (4) { getWidget(mCreateButton, "CreateButton"); getWidget(mCancelButton, "CancelButton"); diff --git a/apps/openmw/mwgui/bookpage.cpp b/apps/openmw/mwgui/bookpage.cpp index 962e594ae..cfb49ebff 100644 --- a/apps/openmw/mwgui/bookpage.cpp +++ b/apps/openmw/mwgui/bookpage.cpp @@ -228,8 +228,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter Typesetter (size_t width, size_t height) : mPageWidth (width), mPageHeight(height), mSection (NULL), mLine (NULL), mRun (NULL), - mCurrentAlignment (AlignLeft), - mCurrentContent (NULL) + mCurrentContent (NULL), + mCurrentAlignment (AlignLeft) { mBook = boost::make_shared (); } @@ -697,10 +697,10 @@ namespace GlyphStream (MyGUI::IFont* font, float left, float top, float Z, MyGUI::Vertex* vertices, RenderXform const & renderXform) : - mZ(Z), mOrigin (left, top), - mFont (font), mVertices (vertices), - mRenderXform (renderXform), - mC(0) + mZ(Z), + mC(0), mFont (font), mOrigin (left, top), + mVertices (vertices), + mRenderXform (renderXform) { mVertexColourType = MyGUI::RenderManager::getInstance().getVertexFormat(); } @@ -801,10 +801,10 @@ protected: TextFormat (MyGUI::IFont* id, PageDisplay * display) : mFont (id), + mCountVertex (0), mTexture (NULL), mRenderItem (NULL), - mDisplay (display), - mCountVertex (0) + mDisplay (display) { } diff --git a/apps/openmw/mwgui/bookwindow.cpp b/apps/openmw/mwgui/bookwindow.cpp index 55a9b6191..6863994b8 100644 --- a/apps/openmw/mwgui/bookwindow.cpp +++ b/apps/openmw/mwgui/bookwindow.cpp @@ -18,9 +18,9 @@ namespace MWGui BookWindow::BookWindow () : WindowBase("openmw_book.layout") + , mCurrentPage(0) , mTakeButtonShow(true) , mTakeButtonAllowed(true) - , mCurrentPage(0) { getWidget(mCloseButton, "CloseButton"); mCloseButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BookWindow::onCloseButtonClicked); diff --git a/apps/openmw/mwgui/companionwindow.cpp b/apps/openmw/mwgui/companionwindow.cpp index fe47437ca..4433f9ef8 100644 --- a/apps/openmw/mwgui/companionwindow.cpp +++ b/apps/openmw/mwgui/companionwindow.cpp @@ -37,11 +37,11 @@ namespace MWGui CompanionWindow::CompanionWindow(DragAndDrop *dragAndDrop, MessageBoxManager* manager) : WindowBase("openmw_companion_window.layout") + , mSortModel(NULL) + , mModel(NULL) + , mSelectedItem(-1) , mDragAndDrop(dragAndDrop) , mMessageBoxManager(manager) - , mSelectedItem(-1) - , mModel(NULL) - , mSortModel(NULL) { getWidget(mCloseButton, "CloseButton"); getWidget(mProfitLabel, "ProfitLabel"); diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 579730f42..1317e1e25 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -33,10 +33,10 @@ namespace MWGui ContainerWindow::ContainerWindow(DragAndDrop* dragAndDrop) : WindowBase("openmw_container_window.layout") , mDragAndDrop(dragAndDrop) - , mSelectedItem(-1) - , mModel(NULL) - , mSortModel(NULL) , mPickpocketDetected(false) + , mSortModel(NULL) + , mModel(NULL) + , mSelectedItem(-1) { getWidget(mDisposeCorpseButton, "DisposeCorpseButton"); getWidget(mTakeButton, "TakeButton"); diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 1b07522f3..692cea952 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -248,10 +248,10 @@ namespace MWGui DialogueWindow::DialogueWindow() : WindowBase("openmw_dialogue_window.layout") - , mPersuasionDialog() - , mEnabled(false) , mServices(0) + , mEnabled(false) , mGoodbye(false) + , mPersuasionDialog() { // Centre dialog center(); diff --git a/apps/openmw/mwgui/draganddrop.cpp b/apps/openmw/mwgui/draganddrop.cpp index fcb381b95..55aeb969c 100644 --- a/apps/openmw/mwgui/draganddrop.cpp +++ b/apps/openmw/mwgui/draganddrop.cpp @@ -20,12 +20,12 @@ namespace MWGui DragAndDrop::DragAndDrop() - : mDraggedWidget(NULL) - , mDraggedCount(0) + : mIsOnDragAndDrop(false) + , mDraggedWidget(NULL) , mSourceModel(NULL) , mSourceView(NULL) , mSourceSortModel(NULL) - , mIsOnDragAndDrop(false) + , mDraggedCount(0) { } diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 9aa8a8ea1..af24f3f79 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -50,17 +50,17 @@ namespace MWGui InventoryWindow::InventoryWindow(DragAndDrop* dragAndDrop) : WindowPinnableBase("openmw_inventory_window.layout") - , mTrading(false) - , mLastXSize(0) - , mLastYSize(0) - , mPreview(new MWRender::InventoryPreview(MWBase::Environment::get().getWorld ()->getPlayerPtr())) + , mDragAndDrop(dragAndDrop) , mPreviewDirty(true) , mPreviewResize(true) - , mDragAndDrop(dragAndDrop) + , mSelectedItem(-1) , mSortModel(NULL) , mTradeModel(NULL) - , mSelectedItem(-1) , mGuiMode(GM_Inventory) + , mLastXSize(0) + , mLastYSize(0) + , mPreview(new MWRender::InventoryPreview(MWBase::Environment::get().getWorld ()->getPlayerPtr())) + , mTrading(false) { mMainWidget->castType()->eventWindowChangeCoord += MyGUI::newDelegate(this, &InventoryWindow::onWindowResize); diff --git a/apps/openmw/mwgui/itemmodel.cpp b/apps/openmw/mwgui/itemmodel.cpp index 8224fd55b..9fce6e84d 100644 --- a/apps/openmw/mwgui/itemmodel.cpp +++ b/apps/openmw/mwgui/itemmodel.cpp @@ -14,10 +14,10 @@ namespace MWGui { ItemStack::ItemStack(const MWWorld::Ptr &base, ItemModel *creator, size_t count) - : mCreator(creator) - , mCount(count) + : mType(Type_Normal) , mFlags(0) - , mType(Type_Normal) + , mCreator(creator) + , mCount(count) , mBase(base) { if (base.getClass().getEnchantment(base) != "") @@ -59,10 +59,10 @@ namespace MWGui } ItemStack::ItemStack() - : mCreator(NULL) - , mCount(0) + : mType(Type_Normal) , mFlags(0) - , mType(Type_Normal) + , mCreator(NULL) + , mCount(0) { } diff --git a/apps/openmw/mwgui/jailscreen.cpp b/apps/openmw/mwgui/jailscreen.cpp index 5c0a6ec5f..936da2d8e 100644 --- a/apps/openmw/mwgui/jailscreen.cpp +++ b/apps/openmw/mwgui/jailscreen.cpp @@ -19,9 +19,9 @@ namespace MWGui { JailScreen::JailScreen() : WindowBase("openmw_jail_screen.layout"), - mTimeAdvancer(0.01f), mDays(1), - mFadeTimeRemaining(0) + mFadeTimeRemaining(0), + mTimeAdvancer(0.01f) { getWidget(mProgressBar, "ProgressBar"); diff --git a/apps/openmw/mwgui/journalbooks.cpp b/apps/openmw/mwgui/journalbooks.cpp index 34a852562..f84fb517b 100644 --- a/apps/openmw/mwgui/journalbooks.cpp +++ b/apps/openmw/mwgui/journalbooks.cpp @@ -68,8 +68,8 @@ namespace AddJournalEntry (MWGui::BookTypesetter::Ptr typesetter, MWGui::BookTypesetter::Style* body_style, MWGui::BookTypesetter::Style* header_style, bool add_header) : AddEntry (typesetter, body_style), - mHeaderStyle (header_style), - mAddHeader (add_header) + mAddHeader (add_header), + mHeaderStyle (header_style) { } @@ -94,7 +94,7 @@ namespace AddTopicEntry (MWGui::BookTypesetter::Ptr typesetter, MWGui::BookTypesetter::Style* body_style, MWGui::BookTypesetter::Style* header_style, intptr_t contentId) : - AddEntry (typesetter, body_style), mHeaderStyle (header_style), mContentId (contentId) + AddEntry (typesetter, body_style), mContentId (contentId), mHeaderStyle (header_style) { } diff --git a/apps/openmw/mwgui/journalviewmodel.cpp b/apps/openmw/mwgui/journalviewmodel.cpp index 9a47070c2..d05257e46 100644 --- a/apps/openmw/mwgui/journalviewmodel.cpp +++ b/apps/openmw/mwgui/journalviewmodel.cpp @@ -92,7 +92,7 @@ struct JournalViewModelImpl : JournalViewModel JournalViewModelImpl const * mModel; BaseEntry (JournalViewModelImpl const * model, iterator_t itr) : - mModel (model), itr (itr), loaded (false) + itr (itr), mModel (model), loaded (false) {} virtual ~BaseEntry () {} diff --git a/apps/openmw/mwgui/loadingscreen.cpp b/apps/openmw/mwgui/loadingscreen.cpp index 3204c6548..db7b32018 100644 --- a/apps/openmw/mwgui/loadingscreen.cpp +++ b/apps/openmw/mwgui/loadingscreen.cpp @@ -32,11 +32,11 @@ namespace MWGui { LoadingScreen::LoadingScreen(Ogre::SceneManager* sceneMgr, Ogre::RenderWindow* rw) - : mSceneMgr(sceneMgr) + : WindowBase("openmw_loading_screen.layout") + , mSceneMgr(sceneMgr) , mWindow(rw) - , WindowBase("openmw_loading_screen.layout") - , mLastRenderTime(0) , mLastWallpaperChangeTime(0) + , mLastRenderTime(0) , mProgress(0) , mVSyncWasEnabled(false) { diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index 9adfeffe8..c59432796 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -144,16 +144,16 @@ namespace MWGui : mCurX(0) , mCurY(0) , mInterior(false) - , mFogOfWar(true) , mLocalMap(NULL) + , mCompass(NULL) , mPrefix() , mChanged(true) + , mFogOfWar(true) + , mMapWidgetSize(0) + , mCustomMarkers(markers) + , mMarkerUpdateTimer(0.0f) , mLastDirectionX(0.0f) , mLastDirectionY(0.0f) - , mCompass(NULL) - , mMarkerUpdateTimer(0.0f) - , mCustomMarkers(markers) - , mMapWidgetSize(0) { mCustomMarkers.eventMarkersChanged += MyGUI::newDelegate(this, &LocalMapBase::updateCustomMarkers); } @@ -550,16 +550,16 @@ namespace MWGui MapWindow::MapWindow(CustomMarkerCollection &customMarkers, DragAndDrop* drag, const std::string& cacheDir) : WindowPinnableBase("openmw_map_window.layout") - , NoDrop(drag, mMainWidget) , LocalMapBase(customMarkers) - , mGlobal(false) + , NoDrop(drag, mMainWidget) , mGlobalMap(0) - , mGlobalMapRender(0) - , mEditNoteDialog() - , mEventBoxGlobal(NULL) - , mEventBoxLocal(NULL) , mGlobalMapImage(NULL) , mGlobalMapOverlay(NULL) + , mGlobal(false) + , mEventBoxGlobal(NULL) + , mEventBoxLocal(NULL) + , mGlobalMapRender(0) + , mEditNoteDialog() { static bool registered = false; if (!registered) diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp index b7c67e68b..6e81ed626 100644 --- a/apps/openmw/mwgui/messagebox.cpp +++ b/apps/openmw/mwgui/messagebox.cpp @@ -161,10 +161,10 @@ namespace MWGui MessageBox::MessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message) : Layout("openmw_messagebox.layout") - , mMessageBoxManager(parMessageBoxManager) - , mMessage(message) , mCurrentTime(0) , mMaxTime(0) + , mMessageBoxManager(parMessageBoxManager) + , mMessage(message) { // defines mBottomPadding = 48; @@ -195,8 +195,8 @@ namespace MWGui InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxManager, const std::string& message, const std::vector& buttons) : WindowModal("openmw_interactive_messagebox.layout") , mMessageBoxManager(parMessageBoxManager) + , mTextButtonPadding(0) , mButtonPressed(-1) - , mTextButtonPadding(0) { WindowModal::open(); diff --git a/apps/openmw/mwgui/sortfilteritemmodel.cpp b/apps/openmw/mwgui/sortfilteritemmodel.cpp index 6c164df88..183ab07ff 100644 --- a/apps/openmw/mwgui/sortfilteritemmodel.cpp +++ b/apps/openmw/mwgui/sortfilteritemmodel.cpp @@ -70,9 +70,9 @@ namespace MWGui SortFilterItemModel::SortFilterItemModel(ItemModel *sourceModel) : mCategory(Category_All) + , mFilter(0) , mShowEquipped(true) , mSortByType(true) - , mFilter(0) { mSourceModel = sourceModel; } diff --git a/apps/openmw/mwgui/spellbuyingwindow.cpp b/apps/openmw/mwgui/spellbuyingwindow.cpp index 76a1d51e5..ae7b7588a 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.cpp +++ b/apps/openmw/mwgui/spellbuyingwindow.cpp @@ -23,8 +23,8 @@ namespace MWGui SpellBuyingWindow::SpellBuyingWindow() : WindowBase("openmw_spell_buying_window.layout") - , mCurrentY(0) , mLastPos(0) + , mCurrentY(0) { setCoord(0, 0, 450, 300); diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index c744d3ed6..1c670838f 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -483,15 +483,15 @@ namespace MWGui EffectEditorBase::EffectEditorBase(Type type) - : mAddEffectDialog() - , mAvailableEffectsList(NULL) + : mAvailableEffectsList(NULL) , mUsedEffectsView(NULL) + , mAddEffectDialog() , mSelectAttributeDialog(NULL) , mSelectSkillDialog(NULL) , mSelectedEffect(0) , mSelectedKnownEffectId(0) - , mType(type) , mConstantEffect(false) + , mType(type) { mAddEffectDialog.eventEffectAdded += MyGUI::newDelegate(this, &EffectEditorBase::onEffectAdded); mAddEffectDialog.eventEffectModified += MyGUI::newDelegate(this, &EffectEditorBase::onEffectModified); diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 4e83c25db..34896c0bd 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -30,15 +30,15 @@ namespace MWGui ToolTips::ToolTips() : Layout("openmw_tooltips.layout") - , mFullHelp(false) - , mEnabled(true) , mFocusToolTipX(0.0) , mFocusToolTipY(0.0) + , mHorizontalScrollIndex(0) , mDelay(0.0) , mRemainingDelay(0.0) , mLastMouseX(0) , mLastMouseY(0) - , mHorizontalScrollIndex(0) + , mEnabled(true) + , mFullHelp(false) { getWidget(mDynamicToolTipBox, "DynamicToolTipBox"); diff --git a/apps/openmw/mwgui/waitdialog.cpp b/apps/openmw/mwgui/waitdialog.cpp index 28e3be591..ed261e7eb 100644 --- a/apps/openmw/mwgui/waitdialog.cpp +++ b/apps/openmw/mwgui/waitdialog.cpp @@ -50,13 +50,13 @@ namespace MWGui WaitDialog::WaitDialog() : WindowBase("openmw_wait_dialog.layout") - , mProgressBar() , mTimeAdvancer(0.05f) , mSleeping(false) , mHours(1) , mManualHours(1) , mFadeTimeRemaining(0) , mInterruptAt(-1) + , mProgressBar() { getWidget(mDateTimeText, "DateTimeText"); getWidget(mRestText, "RestText"); diff --git a/apps/openmw/mwgui/windowbase.cpp b/apps/openmw/mwgui/windowbase.cpp index 8fdcf6b20..899f8a5e8 100644 --- a/apps/openmw/mwgui/windowbase.cpp +++ b/apps/openmw/mwgui/windowbase.cpp @@ -78,7 +78,7 @@ void WindowModal::close() } NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget) - : mDrag(drag), mWidget(widget), mTransparent(false) + : mWidget(widget), mDrag(drag), mTransparent(false) { if (!mWidget) throw std::runtime_error("NoDrop needs a non-NULL widget!"); diff --git a/apps/openmw/mwmechanics/aiavoiddoor.cpp b/apps/openmw/mwmechanics/aiavoiddoor.cpp index a73d955c5..fccace55c 100644 --- a/apps/openmw/mwmechanics/aiavoiddoor.cpp +++ b/apps/openmw/mwmechanics/aiavoiddoor.cpp @@ -13,7 +13,7 @@ #include "steering.hpp" MWMechanics::AiAvoidDoor::AiAvoidDoor(const MWWorld::Ptr& doorPtr) -: AiPackage(), mDoorPtr(doorPtr), mDuration(1), mAdjAngle(0) +: AiPackage(), mDuration(1), mDoorPtr(doorPtr), mAdjAngle(0) { } diff --git a/apps/openmw/mwmechanics/aicombat.cpp b/apps/openmw/mwmechanics/aicombat.cpp index 2f68087e5..649f259d9 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -111,17 +111,17 @@ namespace MWMechanics mTimerAttack(0), mTimerReact(0), mTimerCombatMove(0), + mReadyToAttack(false), mAttack(false), mFollowTarget(false), mCombatMove(false), - mReadyToAttack(false), - mForceNoShortcut(false), + mLastTargetPos(0,0,0), mCell(NULL), mCurrentAction(), mActionCooldown(0), mStrength(), mMinMaxAttackDurationInitialised(false), - mLastTargetPos(0,0,0), + mForceNoShortcut(false), mLastActorPos(0,0,0), mMovement(){} }; diff --git a/apps/openmw/mwmechanics/aiescort.cpp b/apps/openmw/mwmechanics/aiescort.cpp index 91bf7c9b0..f9ebefe13 100644 --- a/apps/openmw/mwmechanics/aiescort.cpp +++ b/apps/openmw/mwmechanics/aiescort.cpp @@ -49,12 +49,11 @@ namespace MWMechanics } AiEscort::AiEscort(const ESM::AiSequence::AiEscort *escort) - : mActorId(escort->mTargetId), mX(escort->mData.mX), mY(escort->mData.mY), mZ(escort->mData.mZ) + : mActorId(escort->mTargetId), mCellId(escort->mCellId), mX(escort->mData.mX), mY(escort->mData.mY), mZ(escort->mData.mZ) + , mMaxDist(450) + , mRemainingDuration(escort->mRemainingDuration) , mCellX(std::numeric_limits::max()) , mCellY(std::numeric_limits::max()) - , mCellId(escort->mCellId) - , mRemainingDuration(escort->mRemainingDuration) - , mMaxDist(450) { } diff --git a/apps/openmw/mwmechanics/aifollow.cpp b/apps/openmw/mwmechanics/aifollow.cpp index 161f4bb90..ddfc14581 100644 --- a/apps/openmw/mwmechanics/aifollow.cpp +++ b/apps/openmw/mwmechanics/aifollow.cpp @@ -32,27 +32,27 @@ int AiFollow::mFollowIndexCounter = 0; AiFollow::AiFollow(const std::string &actorId,float duration, float x, float y, float z) : mAlwaysFollow(false), mCommanded(false), mRemainingDuration(duration), mX(x), mY(y), mZ(z) -, mActorRefId(actorId), mCellId(""), mActorId(-1), mFollowIndex(mFollowIndexCounter++), mActive(false) +, mActorRefId(actorId), mActorId(-1), mCellId(""), mActive(false), mFollowIndex(mFollowIndexCounter++) { } AiFollow::AiFollow(const std::string &actorId,const std::string &cellId,float duration, float x, float y, float z) : mAlwaysFollow(false), mCommanded(false), mRemainingDuration(duration), mX(x), mY(y), mZ(z) -, mActorRefId(actorId), mCellId(cellId), mActorId(-1), mFollowIndex(mFollowIndexCounter++), mActive(false) +, mActorRefId(actorId), mActorId(-1), mCellId(cellId), mActive(false), mFollowIndex(mFollowIndexCounter++) { } AiFollow::AiFollow(const std::string &actorId, bool commanded) : mAlwaysFollow(true), mCommanded(commanded), mRemainingDuration(0), mX(0), mY(0), mZ(0) -, mActorRefId(actorId), mCellId(""), mActorId(-1), mFollowIndex(mFollowIndexCounter++), mActive(false) +, mActorRefId(actorId), mActorId(-1), mCellId(""), mActive(false), mFollowIndex(mFollowIndexCounter++) { } AiFollow::AiFollow(const ESM::AiSequence::AiFollow *follow) - : mAlwaysFollow(follow->mAlwaysFollow), mRemainingDuration(follow->mRemainingDuration) + : mAlwaysFollow(follow->mAlwaysFollow), mCommanded(follow->mCommanded), mRemainingDuration(follow->mRemainingDuration) , mX(follow->mData.mX), mY(follow->mData.mY), mZ(follow->mData.mZ) - , mActorRefId(follow->mTargetId), mActorId(-1), mCellId(follow->mCellId) - , mCommanded(follow->mCommanded), mFollowIndex(mFollowIndexCounter++), mActive(follow->mActive) + , mActorRefId(follow->mTargetId), mActorId(-1) + , mCellId(follow->mCellId), mActive(follow->mActive), mFollowIndex(mFollowIndexCounter++) { } diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index 560e756ce..076636974 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -786,10 +786,10 @@ namespace MWMechanics AiWander::AiWander (const ESM::AiSequence::AiWander* wander) : mDistance(wander->mData.mDistance) , mDuration(wander->mData.mDuration) - , mStartTime(MWWorld::TimeStamp(wander->mStartTime)) , mTimeOfDay(wander->mData.mTimeOfDay) , mRepeat(wander->mData.mShouldRepeat != 0) , mStoredInitialActorPosition(wander->mStoredInitialActorPosition) + , mStartTime(MWWorld::TimeStamp(wander->mStartTime)) { if (mStoredInitialActorPosition) mInitialActorPosition = wander->mInitialActorPosition; diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index ffde59aee..399b51151 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -642,8 +642,8 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim , mJumpState(JumpState_None) , mWeaponType(WeapType_None) , mSkipAnim(false) - , mSecondsOfRunning(0) , mSecondsOfSwimming(0) + , mSecondsOfRunning(0) , mTurnAnimationThreshold(0) { if(!mAnimation) diff --git a/apps/openmw/mwmechanics/creaturestats.cpp b/apps/openmw/mwmechanics/creaturestats.cpp index 4c338e23f..308e72027 100644 --- a/apps/openmw/mwmechanics/creaturestats.cpp +++ b/apps/openmw/mwmechanics/creaturestats.cpp @@ -15,16 +15,12 @@ namespace MWMechanics int CreatureStats::sActorId = 0; CreatureStats::CreatureStats() - : mLevel (0), mDead (false), mDied (false), mMurdered(false), mFriendlyHits (0), - mTalkedTo (false), mAlarmed (false), - mAttacked (false), - mAttackingOrSpell(false), - mIsWerewolf(false), - mFallHeight(0), mRecalcMagicka(false), mKnockdown(false), mKnockdownOneFrame(false), - mKnockdownOverOneFrame(false), mHitRecovery(false), mBlock(false), - mMovementFlags(0), mDrawState (DrawState_Nothing), mAttackStrength(0.f), - mLastRestock(0,0), mGoldPool(0), mActorId(-1), - mDeathAnimation(0) + : mDrawState (DrawState_Nothing), mDead (false), mDied (false), mMurdered(false), mFriendlyHits (0), + mTalkedTo (false), mAlarmed (false), mAttacked (false), mAttackingOrSpell(false), + mKnockdown(false), mKnockdownOneFrame(false), mKnockdownOverOneFrame(false), + mHitRecovery(false), mBlock(false), mMovementFlags(0), mAttackStrength(0.f), + mFallHeight(0), mRecalcMagicka(false), mLastRestock(0,0), mGoldPool(0), mActorId(-1), + mDeathAnimation(0), mIsWerewolf(false), mLevel (0) { for (int i=0; i<4; ++i) mAiSettings[i] = 0; diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp index 7f468f6d4..94819e626 100644 --- a/apps/openmw/mwmechanics/npcstats.cpp +++ b/apps/openmw/mwmechanics/npcstats.cpp @@ -25,12 +25,12 @@ #include "../mwbase/soundmanager.hpp" MWMechanics::NpcStats::NpcStats() - : mBounty (0) -, mLevelProgress(0) -, mDisposition(0) + : mDisposition (0) , mReputation(0) , mCrimeId(-1) +, mBounty(0) , mWerewolfKills (0) +, mLevelProgress(0) , mTimeToStartDrowning(20.0) { mSkillIncreases.resize (ESM::Attribute::Length, 0); diff --git a/apps/openmw/mwmechanics/obstacle.cpp b/apps/openmw/mwmechanics/obstacle.cpp index 6bf81e861..7cfa6fcd5 100644 --- a/apps/openmw/mwmechanics/obstacle.cpp +++ b/apps/openmw/mwmechanics/obstacle.cpp @@ -63,10 +63,10 @@ namespace MWMechanics ObstacleCheck::ObstacleCheck(): mPrevX(0) // to see if the moved since last time , mPrevY(0) - , mDistSameSpot(-1) // avoid calculating it each time , mWalkState(State_Norm) , mStuckDuration(0) , mEvadeDuration(0) + , mDistSameSpot(-1) // avoid calculating it each time { } diff --git a/apps/openmw/mwmechanics/pathgrid.cpp b/apps/openmw/mwmechanics/pathgrid.cpp index c1e094bb1..4e9bc8904 100644 --- a/apps/openmw/mwmechanics/pathgrid.cpp +++ b/apps/openmw/mwmechanics/pathgrid.cpp @@ -51,12 +51,12 @@ namespace MWMechanics { PathgridGraph::PathgridGraph() : mCell(NULL) - , mIsGraphConstructed(false) , mPathgrid(NULL) + , mIsExterior(0) , mGraph(0) + , mIsGraphConstructed(false) , mSCCId(0) , mSCCIndex(0) - , mIsExterior(0) { } diff --git a/apps/openmw/mwrender/globalmap.cpp b/apps/openmw/mwrender/globalmap.cpp index 95d4429d6..90cf27049 100644 --- a/apps/openmw/mwrender/globalmap.cpp +++ b/apps/openmw/mwrender/globalmap.cpp @@ -25,10 +25,11 @@ namespace MWRender GlobalMap::GlobalMap(const std::string &cacheDir) : mCacheDir(cacheDir) - , mMinX(0), mMaxX(0) - , mMinY(0), mMaxY(0) , mWidth(0) , mHeight(0) + , mMinX(0), mMaxX(0) + , mMinY(0), mMaxY(0) + { mCellSize = Settings::Manager::getInt("global map cell size", "Map"); } diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index a16b156ae..f2175ced5 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -186,10 +186,10 @@ void PlaneReflection::setVisibilityMask (int flags) Water::Water (Ogre::Camera *camera, RenderingManager* rend, const MWWorld::Fallback* fallback) : mCamera (camera), mSceneMgr (camera->getSceneManager()), - mIsUnderwater(false), mVisibilityFlags(0), - mActive(1), mToggled(1), + mIsUnderwater(false), mActive(1), + mToggled(1), mWaterTimer(0.f), mRendering(rend), - mWaterTimer(0.f), + mVisibilityFlags(0), mReflection(NULL), mRefraction(NULL), mSimulation(NULL), diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 06c40dd8e..c7fb9ea50 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -33,13 +33,13 @@ namespace MWSound , mMasterVolume(1.0f) , mSFXVolume(1.0f) , mMusicVolume(1.0f) - , mFootstepsVolume(1.0f) , mVoiceVolume(1.0f) - , mPausedSoundTypes(0) + , mFootstepsVolume(1.0f) + , mListenerUnderwater(false) , mListenerPos(0,0,0) , mListenerDir(1,0,0) , mListenerUp(0,0,1) - , mListenerUnderwater(false) + , mPausedSoundTypes(0) { if(!useSound) return; diff --git a/apps/openmw/mwworld/action.cpp b/apps/openmw/mwworld/action.cpp index 1c360fd4d..5e1fb41a6 100644 --- a/apps/openmw/mwworld/action.cpp +++ b/apps/openmw/mwworld/action.cpp @@ -11,7 +11,7 @@ const MWWorld::Ptr& MWWorld::Action::getTarget() const return mTarget; } -MWWorld::Action::Action (bool keepSound, const Ptr& target) : mKeepSound (keepSound), mTarget (target), mSoundOffset(0) +MWWorld::Action::Action (bool keepSound, const Ptr& target) : mKeepSound (keepSound), mSoundOffset(0), mTarget (target) {} MWWorld::Action::~Action() {} diff --git a/apps/openmw/mwworld/esmloader.cpp b/apps/openmw/mwworld/esmloader.cpp index 13a786d00..b12d646e7 100644 --- a/apps/openmw/mwworld/esmloader.cpp +++ b/apps/openmw/mwworld/esmloader.cpp @@ -9,8 +9,8 @@ namespace MWWorld EsmLoader::EsmLoader(MWWorld::ESMStore& store, std::vector& readers, ToUTF8::Utf8Encoder* encoder, Loading::Listener& listener) : ContentLoader(listener) - , mStore(store) , mEsm(readers) + , mStore(store) , mEncoder(encoder) { } diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 2de3abc75..a2e445d58 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -96,10 +96,10 @@ void MWWorld::InventoryStore::readEquipmentState(const MWWorld::ContainerStoreIt } MWWorld::InventoryStore::InventoryStore() - : mSelectedEnchantItem(end()) + : mListener(NULL) , mUpdatesEnabled (true) , mFirstAutoEquip(true) - , mListener(NULL) + , mSelectedEnchantItem(end()) , mRechargingItemsUpToDate(false) { initSlots (mSlots); @@ -107,12 +107,12 @@ MWWorld::InventoryStore::InventoryStore() MWWorld::InventoryStore::InventoryStore (const InventoryStore& store) : ContainerStore (store) - , mSelectedEnchantItem(end()) , mMagicEffects(store.mMagicEffects) - , mFirstAutoEquip(store.mFirstAutoEquip) , mListener(store.mListener) , mUpdatesEnabled(store.mUpdatesEnabled) + , mFirstAutoEquip(store.mFirstAutoEquip) , mPermanentMagicEffectMagnitudes(store.mPermanentMagicEffectMagnitudes) + , mSelectedEnchantItem(end()) , mRechargingItemsUpToDate(false) { copySlots (store); diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index d31ae520b..bec4c6db3 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -499,7 +499,7 @@ namespace MWWorld PhysicsSystem::PhysicsSystem(OEngine::Render::OgreRenderer &_rend) : - mRender(_rend), mEngine(0), mTimeAccum(0.0f), mWaterEnabled(false), mWaterHeight(0) + mRender(_rend), mEngine(0), mTimeAccum(0.0f), mWaterHeight(0), mWaterEnabled(false) { // Create physics. shapeLoader is deleted by the physic engine NifBullet::ManualBulletShapeLoader* shapeLoader = new NifBullet::ManualBulletShapeLoader(); diff --git a/apps/openmw/mwworld/player.cpp b/apps/openmw/mwworld/player.cpp index 58718074e..0b81532e1 100644 --- a/apps/openmw/mwworld/player.cpp +++ b/apps/openmw/mwworld/player.cpp @@ -32,10 +32,10 @@ namespace MWWorld Player::Player (const ESM::NPC *player, const MWBase::World& world) : mCellStore(0), mLastKnownExteriorPosition(0,0,0), + mMarkedCell(NULL), mAutoMove(false), mForwardBackward(0), mTeleported(false), - mMarkedCell(NULL), mCurrentCrimeId(-1), mPaidCrimeId(-1) { diff --git a/apps/openmw/mwworld/refdata.cpp b/apps/openmw/mwworld/refdata.cpp index 14a315a81..ae985f857 100644 --- a/apps/openmw/mwworld/refdata.cpp +++ b/apps/openmw/mwworld/refdata.cpp @@ -37,7 +37,7 @@ namespace MWWorld } RefData::RefData() - : mBaseNode(0), mHasLocals (false), mEnabled (true), mCount (1), mCustomData (0), mChanged(false), mDeleted(false) + : mBaseNode(0), mDeleted(false), mHasLocals (false), mEnabled (true), mCount (1), mCustomData (0), mChanged(false) { for (int i=0; i<3; ++i) { @@ -48,10 +48,10 @@ namespace MWWorld } RefData::RefData (const ESM::CellRef& cellRef) - : mBaseNode(0), mHasLocals (false), mEnabled (true), mCount (1), mPosition (cellRef.mPos), + : mBaseNode(0), mDeleted(false), mHasLocals (false), mEnabled (true), + mCount (1), mPosition (cellRef.mPos), mCustomData (0), - mChanged(false), // Loading from ESM/ESP files -> assume unchanged - mDeleted(false) + mChanged(false) // Loading from ESM/ESP files -> assume unchanged { mLocalRotation.rot[0]=0; mLocalRotation.rot[1]=0; @@ -59,10 +59,12 @@ namespace MWWorld } RefData::RefData (const ESM::ObjectState& objectState) - : mBaseNode (0), mHasLocals (false), mEnabled (objectState.mEnabled != 0), - mCount (objectState.mCount), mPosition (objectState.mPosition), mCustomData (0), - mChanged(true), // Loading from a savegame -> assume changed - mDeleted(false) + : mBaseNode (0), mDeleted(false), mHasLocals (false), + mEnabled (objectState.mEnabled != 0), + mCount (objectState.mCount), + mPosition (objectState.mPosition), + mCustomData (0), + mChanged(true) // Loading from a savegame -> assume changed { for (int i=0; i<3; ++i) mLocalRotation.rot[i] = objectState.mLocalRotation[i]; diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index a9ca8e72b..41ed7c20d 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -114,11 +114,10 @@ float WeatherManager::calculateAngleFade (const std::string& moonName, float ang } WeatherManager::WeatherManager(MWRender::RenderingManager* rendering,MWWorld::Fallback* fallback) : - mHour(14), mCurrentWeather("clear"), mNextWeather(""), mFirstUpdate(true), - mWeatherUpdateTime(0), mThunderFlash(0), mThunderChance(0), - mThunderChanceNeeded(50), mThunderSoundDelay(0), mRemainingTransitionTime(0), - mTimePassed(0), mFallback(fallback), mWindSpeed(0.f), mRendering(rendering), mIsStorm(false), - mStormDirection(0,1,0) + mHour(14), mWindSpeed(0.f), mIsStorm(false), mStormDirection(0,1,0), mFallback(fallback), + mRendering(rendering), mCurrentWeather("clear"), mNextWeather(""), mFirstUpdate(true), + mRemainingTransitionTime(0), mThunderFlash(0), mThunderChance(0), mThunderChanceNeeded(50), + mTimePassed(0), mWeatherUpdateTime(0), mThunderSoundDelay(0) { //Globals mThunderSoundID0 = mFallback->getFallbackString("Weather_Thunderstorm_Thunder_Sound_ID_0"); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index bb0402c4e..b1bac2f4b 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -147,14 +147,12 @@ namespace MWWorld const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir, ToUTF8::Utf8Encoder* encoder, const std::map& fallbackMap, int activationDistanceOverride, const std::string& startCell, const std::string& startupScript) - : mPlayer (0), mLocalScripts (mStore), + : mFallback(fallbackMap), mPlayer (0), mLocalScripts (mStore), mSky (true), mCells (mStore, mEsm), - mActivationDistanceOverride (activationDistanceOverride), - mFallback(fallbackMap), mTeleportEnabled(true), mLevitationEnabled(true), - mGodMode(false), mContentFiles (contentFiles), - mGoToJail(false), mDaysInPrison(0), - mStartCell (startCell), mStartupScript(startupScript), - mScriptsEnabled(true) + mGodMode(false), mScriptsEnabled(true), mContentFiles (contentFiles), + mActivationDistanceOverride (activationDistanceOverride), mStartupScript(startupScript), + mStartCell (startCell), mTeleportEnabled(true), + mLevitationEnabled(true), mGoToJail(false), mDaysInPrison(0) { mPhysics = new PhysicsSystem(renderer); mPhysEngine = mPhysics->getEngine(); @@ -2939,7 +2937,7 @@ namespace MWWorld struct AddDetectedReference { AddDetectedReference(std::vector& out, Ptr detector, World::DetectionType type, float squaredDist) - : mOut(out), mDetector(detector), mType(type), mSquaredDist(squaredDist) + : mOut(out), mDetector(detector), mSquaredDist(squaredDist), mType(type) { } diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index 88b5f5ddb..a71672916 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -56,8 +56,8 @@ namespace Compiler LineParser::LineParser (ErrorHandler& errorHandler, const Context& context, Locals& locals, Literals& literals, std::vector& code, bool allowExpression) : Parser (errorHandler, context), mLocals (locals), mLiterals (literals), mCode (code), - mState (BeginState), mExprParser (errorHandler, context, locals, literals), - mAllowExpression (allowExpression), mButtons(0), mType(0), mReferenceMember(false) + mState (BeginState), mReferenceMember(false), mButtons(0), mType(0), + mExprParser (errorHandler, context, locals, literals), mAllowExpression (allowExpression) {} bool LineParser::parseInt (int value, const TokenLoc& loc, Scanner& scanner) diff --git a/components/interpreter/runtime.cpp b/components/interpreter/runtime.cpp index c71aef95c..dc3da07a8 100644 --- a/components/interpreter/runtime.cpp +++ b/components/interpreter/runtime.cpp @@ -7,7 +7,7 @@ namespace Interpreter { - Runtime::Runtime() : mContext (0), mCode (0), mPC (0), mCodeSize(0) {} + Runtime::Runtime() : mContext (0), mCode (0), mCodeSize(0), mPC (0) {} int Runtime::getPC() const { diff --git a/extern/ogre-ffmpeg-videoplayer/audiodecoder.cpp b/extern/ogre-ffmpeg-videoplayer/audiodecoder.cpp index 1a56802da..77e6b4b6c 100644 --- a/extern/ogre-ffmpeg-videoplayer/audiodecoder.cpp +++ b/extern/ogre-ffmpeg-videoplayer/audiodecoder.cpp @@ -60,21 +60,21 @@ struct AudioResampler MovieAudioDecoder::MovieAudioDecoder(VideoState* videoState) : mVideoState(videoState) , mAVStream(*videoState->audio_st) - , mFrame(av_frame_alloc()) + , mOutputSampleFormat(AV_SAMPLE_FMT_NONE) + , mOutputChannelLayout(0) + , mOutputSampleRate(0) , mFramePos(0) , mFrameSize(0) , mAudioClock(0.0) + , mDataBuf(NULL) + , mFrameData(NULL) + , mDataBufLen(0) + , mFrame(av_frame_alloc()) , mAudioDiffAccum(0.0) , mAudioDiffAvgCoef(exp(log(0.01 / AUDIO_DIFF_AVG_NB))) /* Correct audio only if larger error than this */ , mAudioDiffThreshold(2.0 * 0.050/* 50 ms */) , mAudioDiffAvgCount(0) - , mOutputSampleFormat(AV_SAMPLE_FMT_NONE) - , mOutputSampleRate(0) - , mOutputChannelLayout(0) - , mDataBuf(NULL) - , mFrameData(NULL) - , mDataBufLen(0) { mAudioResampler.reset(new AudioResampler()); } diff --git a/extern/ogre-ffmpeg-videoplayer/videostate.cpp b/extern/ogre-ffmpeg-videoplayer/videostate.cpp index 66c7c2ad5..877906f6d 100644 --- a/extern/ogre-ffmpeg-videoplayer/videostate.cpp +++ b/extern/ogre-ffmpeg-videoplayer/videostate.cpp @@ -59,16 +59,18 @@ namespace Video { VideoState::VideoState() - : format_ctx(NULL), av_sync_type(AV_SYNC_DEFAULT) + : mAudioFactory(NULL) + , format_ctx(NULL) + , av_sync_type(AV_SYNC_DEFAULT) , audio_st(NULL) , video_st(NULL), frame_last_pts(0.0) , video_clock(0.0), sws_context(NULL), rgbaFrame(NULL), pictq_size(0) , pictq_rindex(0), pictq_windex(0) - , mQuit(false), mPaused(false) - , mAudioFactory(NULL) , mSeekRequested(false) , mSeekPos(0) , mVideoEnded(false) + , mPaused(false) + , mQuit(false) { mFlushPktData = flush_pkt.data; diff --git a/extern/oics/ICSControl.cpp b/extern/oics/ICSControl.cpp index 974d69f08..1e9679d1f 100644 --- a/extern/oics/ICSControl.cpp +++ b/extern/oics/ICSControl.cpp @@ -32,9 +32,9 @@ namespace ICS { Control::Control(const std::string& name, bool autoChangeDirectionOnLimitsAfterStop, bool autoReverseToInitialValue , float initialValue, float stepSize, float stepsPerSeconds, bool axisBindable) - : mName(name) - , mValue(initialValue) + : mValue(initialValue) , mInitialValue(initialValue) + , mName(name) , mStepSize(stepSize) , mStepsPerSeconds(stepsPerSeconds) , mAutoReverseToInitialValue(autoReverseToInitialValue) diff --git a/extern/oics/ICSInputControlSystem.cpp b/extern/oics/ICSInputControlSystem.cpp index 2599c5761..a8aedfd2e 100644 --- a/extern/oics/ICSInputControlSystem.cpp +++ b/extern/oics/ICSInputControlSystem.cpp @@ -32,13 +32,13 @@ namespace ICS , DetectingBindingListener* detectingBindingListener , InputControlSystemLog* log, size_t channelCount) : mFileName(file) + , mLog(log) , mDetectingBindingListener(detectingBindingListener) , mDetectingBindingControl(NULL) - , mLog(log) - , mXmouseAxisBinded(false), mYmouseAxisBinded(false) - , mClientHeight(1) - , mClientWidth(1) , mDetectingBindingDirection(Control::STOP) + , mXmouseAxisBinded(false), mYmouseAxisBinded(false) + , mClientWidth(1) + , mClientHeight(1) { ICS_LOG(" - Creating InputControlSystem - "); @@ -539,10 +539,10 @@ namespace ICS } binder.SetAttribute( "direction", "DECREASE" ); control.InsertEndChild(binder); - } - JoystickIDList::const_iterator it = mJoystickIDList.begin(); - while(it!=mJoystickIDList.end()) - { + } + JoystickIDList::const_iterator it = mJoystickIDList.begin(); + while(it!=mJoystickIDList.end()) + { int deviceID = *it; if(getJoystickAxisBinding(*o, deviceID, Control/*::ControlChangingDirection*/::INCREASE) != /*NamedAxis::*/UNASSIGNED) @@ -552,8 +552,8 @@ namespace ICS binder.SetAttribute( "axis", ToString( getJoystickAxisBinding(*o, deviceID, Control/*::ControlChangingDirection*/::INCREASE)).c_str() ); - binder.SetAttribute( "direction", "INCREASE" ); - + binder.SetAttribute( "direction", "INCREASE" ); + binder.SetAttribute( "deviceId", deviceID ); //completely useless, but required for backwards compatability control.InsertEndChild(binder); @@ -567,8 +567,8 @@ namespace ICS binder.SetAttribute( "axis", ToString( getJoystickAxisBinding(*o, deviceID, Control/*::ControlChangingDirection*/::DECREASE)).c_str() ); - binder.SetAttribute( "direction", "DECREASE" ); - + binder.SetAttribute( "direction", "DECREASE" ); + binder.SetAttribute( "deviceId", deviceID ); //completely useless, but required for backwards compatability control.InsertEndChild(binder); @@ -582,8 +582,8 @@ namespace ICS binder.SetAttribute( "button", ToString( getJoystickButtonBinding(*o, deviceID, Control/*::ControlChangingDirection*/::INCREASE)).c_str() ); - binder.SetAttribute( "direction", "INCREASE" ); - + binder.SetAttribute( "direction", "INCREASE" ); + binder.SetAttribute( "deviceId", deviceID ); //completely useless, but required for backwards compatability control.InsertEndChild(binder); @@ -597,13 +597,13 @@ namespace ICS binder.SetAttribute( "button", ToString( getJoystickButtonBinding(*o, deviceID, Control/*::ControlChangingDirection*/::DECREASE)).c_str() ); - binder.SetAttribute( "direction", "DECREASE" ); - + binder.SetAttribute( "direction", "DECREASE" ); + binder.SetAttribute( "deviceId", deviceID ); //completely useless, but required for backwards compatability control.InsertEndChild(binder); - } - it++; + } + it++; } diff --git a/extern/sdl4ogre/sdlinputwrapper.cpp b/extern/sdl4ogre/sdlinputwrapper.cpp index aaf669ff4..7e3536ab4 100644 --- a/extern/sdl4ogre/sdlinputwrapper.cpp +++ b/extern/sdl4ogre/sdlinputwrapper.cpp @@ -10,28 +10,28 @@ namespace SFO /// \brief General purpose wrapper for OGRE applications around SDL's event /// queue, mostly used for handling input-related events. InputWrapper::InputWrapper(SDL_Window* window, Ogre::RenderWindow* ogreWindow, bool grab) : - mSDLWindow(window), - mOgreWindow(ogreWindow), + mMouseListener(NULL), + mKeyboardListener(NULL), + mWindowListener(NULL), + mConListener(NULL), + mWarpX(0), + mWarpY(0), mWarpCompensate(false), - mMouseRelative(false), - mGrabPointer(false), mWrapPointer(false), + mAllowGrab(grab), + mWantMouseVisible(false), + mWantGrab(false), + mWantRelative(false), + mGrabPointer(false), + mMouseRelative(false), + mFirstMouseMove(true), mMouseZ(0), - mMouseY(0), mMouseX(0), - mMouseInWindow(true), - mConListener(NULL), - mKeyboardListener(NULL), - mMouseListener(NULL), - mWindowListener(NULL), + mMouseY(0), mWindowHasFocus(true), - mWantGrab(false), - mWantRelative(false), - mWantMouseVisible(false), - mAllowGrab(grab), - mWarpX(0), - mWarpY(0), - mFirstMouseMove(true) + mMouseInWindow(true), + mSDLWindow(window), + mOgreWindow(ogreWindow) { _setupOISKeys(); } diff --git a/extern/shiny/Main/Factory.cpp b/extern/shiny/Main/Factory.cpp index d7c4234cb..d0b86cbf9 100644 --- a/extern/shiny/Main/Factory.cpp +++ b/extern/shiny/Main/Factory.cpp @@ -29,17 +29,17 @@ namespace sh } Factory::Factory (Platform* platform) - : mPlatform(platform) - , mShadersEnabled(true) + : mShadersEnabled(true) , mShaderDebugOutputEnabled(false) - , mCurrentLanguage(Language_None) - , mListener(NULL) - , mCurrentConfiguration(NULL) - , mCurrentLodConfiguration(NULL) , mReadMicrocodeCache(false) , mWriteMicrocodeCache(false) , mReadSourceCache(false) , mWriteSourceCache(false) + , mCurrentConfiguration(NULL) + , mCurrentLodConfiguration(NULL) + , mCurrentLanguage(Language_None) + , mListener(NULL) + , mPlatform(platform) { assert (!sThis); sThis = this; diff --git a/extern/shiny/Main/MaterialInstance.cpp b/extern/shiny/Main/MaterialInstance.cpp index c69d13401..5d1a8e7f9 100644 --- a/extern/shiny/Main/MaterialInstance.cpp +++ b/extern/shiny/Main/MaterialInstance.cpp @@ -9,11 +9,11 @@ namespace sh { MaterialInstance::MaterialInstance (const std::string& name, Factory* f) - : mName(name) + : mFailedToCreate(false) + , mListener(NULL) + , mName(name) , mShadersEnabled(true) , mFactory(f) - , mListener(NULL) - , mFailedToCreate(false) { } diff --git a/extern/shiny/Main/Platform.cpp b/extern/shiny/Main/Platform.cpp index 3eb7f4ad3..f09956e0f 100644 --- a/extern/shiny/Main/Platform.cpp +++ b/extern/shiny/Main/Platform.cpp @@ -7,9 +7,9 @@ namespace sh { Platform::Platform (const std::string& basePath) - : mBasePath(basePath) - , mCacheFolder("./") + : mCacheFolder("./") , mFactory(NULL) + , mBasePath(basePath) { } diff --git a/extern/shiny/Main/ShaderSet.cpp b/extern/shiny/Main/ShaderSet.cpp index 8fb530d39..4e19948ad 100644 --- a/extern/shiny/Main/ShaderSet.cpp +++ b/extern/shiny/Main/ShaderSet.cpp @@ -15,9 +15,9 @@ namespace sh ShaderSet::ShaderSet (const std::string& type, const std::string& cgProfile, const std::string& hlslProfile, const std::string& sourceFile, const std::string& basePath, const std::string& name, PropertySetGet* globalSettingsPtr) : mBasePath(basePath) - , mName(name) , mCgProfile(cgProfile) , mHlslProfile(hlslProfile) + , mName(name) { if (type == "vertex") mType = GPT_Vertex;