From 1cb1259e18b5ffa525489aa1d18e3ad4982e18e7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 23 Sep 2012 19:36:37 +0200 Subject: [PATCH] fixing some unrelated warnings --- apps/openmw/mwclass/book.cpp | 2 -- apps/openmw/mwclass/potion.cpp | 2 -- apps/openmw/mwgui/container.cpp | 2 +- apps/openmw/mwgui/stats_window.cpp | 2 -- apps/openmw/mwgui/tooltips.cpp | 3 ++- libs/openengine/bullet/physic.cpp | 9 ++------- libs/openengine/bullet/pmove.cpp | 6 +++--- libs/openengine/bullet/trace.cpp | 4 ++-- 8 files changed, 10 insertions(+), 20 deletions(-) diff --git a/apps/openmw/mwclass/book.cpp b/apps/openmw/mwclass/book.cpp index bb29e79fe..3653ad901 100644 --- a/apps/openmw/mwclass/book.cpp +++ b/apps/openmw/mwclass/book.cpp @@ -124,8 +124,6 @@ namespace MWClass info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount()); info.icon = ref->base->icon; - const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); - std::string text; text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight); diff --git a/apps/openmw/mwclass/potion.cpp b/apps/openmw/mwclass/potion.cpp index 60167742c..259406b37 100644 --- a/apps/openmw/mwclass/potion.cpp +++ b/apps/openmw/mwclass/potion.cpp @@ -129,8 +129,6 @@ namespace MWClass info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount()); info.icon = ref->base->icon; - const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); - std::string text; text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight); diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 5bf17fdb9..e20cf5914 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -362,7 +362,7 @@ void ContainerBase::drawItems() int maxHeight = mItemView->getSize().height - 58; bool onlyMagic = false; - int categories; + int categories = 0; if (mFilter == Filter_All) categories = MWWorld::ContainerStore::Type_All; else if (mFilter == Filter_Weapon) diff --git a/apps/openmw/mwgui/stats_window.cpp b/apps/openmw/mwgui/stats_window.cpp index 3d394859f..9a23082e6 100644 --- a/apps/openmw/mwgui/stats_window.cpp +++ b/apps/openmw/mwgui/stats_window.cpp @@ -475,8 +475,6 @@ void StatsWindow::updateSkillArea() text += "\n#BF9959"; for (int i=0; i<6; ++i) { - const ESM::Skill* skill = MWBase::Environment::get().getWorld()->getStore().skills.search(faction->data.skillID[i]); - assert(skill); text += "#{"+ESM::Skill::sSkillNameIds[faction->data.skillID[i]]+"}"; if (i<5) text += ", "; diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index c50f544a5..b6aea583b 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -368,7 +368,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info) if (text.size() > 0 && text[0] == '\n') text.erase(0, 1); - const ESM::Enchantment* enchant; + const ESM::Enchantment* enchant = 0; const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore(); if (info.enchant != "") { @@ -440,6 +440,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info) if (info.enchant != "") { + assert(enchant); Widget* enchantArea = mDynamicToolTipBox->createWidget("", IntCoord(0, totalSize.height, 300, 300-totalSize.height), Align::Stretch, "ToolTipEnchantArea"); diff --git a/libs/openengine/bullet/physic.cpp b/libs/openengine/bullet/physic.cpp index 74352b358..b42ffb84c 100644 --- a/libs/openengine/bullet/physic.cpp +++ b/libs/openengine/bullet/physic.cpp @@ -303,16 +303,11 @@ namespace Physic + boost::lexical_cast(y); // find the minimum and maximum heights (needed for bullet) - float minh; - float maxh; + float minh = heights[0]; + float maxh = heights[0]; for (int i=0; imaxh) maxh = h; if (h