aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/math
diff options
context:
space:
mode:
authorPaul Gilbert2010-08-05 11:57:06 +0000
committerEugene Sandulenko2010-10-12 22:24:58 +0000
commit6b755174bd45ac0d44052b2eee2609710fabe1fb (patch)
treeb32988286c72840a7d71e7cc166af80d005d7ab7 /engines/sword25/math
parentccba0891fdce8e043fbb7cc5e4015590ab8a7b6b (diff)
downloadscummvm-rg350-6b755174bd45ac0d44052b2eee2609710fabe1fb.tar.gz
scummvm-rg350-6b755174bd45ac0d44052b2eee2609710fabe1fb.tar.bz2
scummvm-rg350-6b755174bd45ac0d44052b2eee2609710fabe1fb.zip
SWORD25: Fixed some potentially uninitialised variable warnings
svn-id: r53212
Diffstat (limited to 'engines/sword25/math')
-rw-r--r--engines/sword25/math/geometry_script.cpp2
-rw-r--r--engines/sword25/math/region.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp
index 7a0fcd8188..f01f977f4a 100644
--- a/engines/sword25/math/geometry_script.cpp
+++ b/engines/sword25/math/geometry_script.cpp
@@ -202,7 +202,7 @@ static unsigned int TableRegionToRegion(lua_State *L, const char *ClassName) {
return 0;
}
- unsigned int RegionHandle;
+ unsigned int RegionHandle = 0;
if (!strcmp(ClassName, REGION_CLASS_NAME)) {
RegionHandle = BS_Region::Create(BS_Region::RT_REGION);
} else if (!strcmp(ClassName, WALKREGION_CLASS_NAME)) {
diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp
index 4999a4340e..bab5381990 100644
--- a/engines/sword25/math/region.cpp
+++ b/engines/sword25/math/region.cpp
@@ -60,7 +60,7 @@ BS_Region::BS_Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_
// -----------------------------------------------------------------------------
unsigned int BS_Region::Create(REGION_TYPE Type) {
- BS_Region * RegionPtr;
+ BS_Region * RegionPtr = NULL;
switch (Type) {
case RT_REGION:
RegionPtr = new BS_Region();
@@ -85,7 +85,7 @@ unsigned int BS_Region::Create(BS_InputPersistenceBlock & Reader, unsigned int H
Reader.Read(Type);
// Depending on the type, create a new BS_Region or BS_WalkRegion object
- BS_Region * RegionPtr;
+ BS_Region *RegionPtr = NULL;
if (Type == RT_REGION) {
RegionPtr = new BS_Region(Reader, Handle);
} else if (Type == RT_WALKREGION) {