Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 7, 2017
1 parent 08fa6cb commit e20d3fe
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/libdoomsday/src/console/exec.cpp
Expand Up @@ -1168,7 +1168,7 @@ D_CMD(If)
{"<=", IF_LEQUAL},
{NULL, 0}
};
uint i, oper;
uint i, oper = IF_EQUAL;
cvar_t *var;
dd_bool isTrue = false;

Expand Down
12 changes: 6 additions & 6 deletions doomsday/apps/libdoomsday/src/console/knownword.cpp
Expand Up @@ -64,8 +64,8 @@ static bool compareKnownWordByName(knownword_t const &a, knownword_t const &b)
case WT_GAME: textA = AutoStr_FromTextStd(reinterpret_cast<Game const *>(wA->data)->id().toUtf8().constData()); break;

default:
App_FatalError("compareKnownWordByName: Invalid type %i for word A.", wA->type);
exit(1); // Unreachable
DENG_ASSERT(!"compareKnownWordByName: Invalid type for word A");
return false;
}

switch (wB->type)
Expand All @@ -76,8 +76,8 @@ static bool compareKnownWordByName(knownword_t const &a, knownword_t const &b)
case WT_GAME: textB = AutoStr_FromTextStd(reinterpret_cast<Game const *>(wB->data)->id().toUtf8().constData()); break;

default:
App_FatalError("compareKnownWordByName: Invalid type %i for word B.", wB->type);
exit(1); // Unreachable
DENG_ASSERT(!"compareKnownWordByName: Invalid type for word B");
return nullptr;
}

return Str_CompareIgnoreCase(textA, Str_Text(textB)) < 0;
Expand All @@ -98,8 +98,8 @@ static AutoStr *textForKnownWord(knownword_t const *word)
case WT_GAME: text = AutoStr_FromTextStd(reinterpret_cast<Game const *>(word->data)->id().toUtf8().constData()); break;

default:
App_FatalError("textForKnownWord: Invalid type %i for word.", word->type);
exit(1); // Unreachable
DENG_ASSERT(!"textForKnownWord: Invalid type for word");
text = AutoStr_FromTextStd("");
}

return text;
Expand Down
8 changes: 4 additions & 4 deletions doomsday/apps/plugins/common/src/world/p_xgline.cpp
Expand Up @@ -977,8 +977,8 @@ int XL_TraversePlanes(Line *line, int refType, int ref, void *data, void *contex
{
LOG_AS(travsectors? "XL_TraverseSectors" : "XL_TraversePlanes");

int tag;
mobj_t *mo;
int tag = 0;
mobj_t *mo = NULL;
dd_bool ok, findSecTagged;

if(xgDev)
Expand Down Expand Up @@ -1180,10 +1180,10 @@ int XL_TraverseLines(Line* line, int rtype, int ref, void* data,
LOG_AS("XL_TraverseLines");

int i;
int tag;
int tag = 0;
int reftype = rtype;
char buff[50];
Line *iter;
Line *iter = NULL;
dd_bool findLineTagged;

// Binary XG data from DD_XGDATA uses the old flag values.
Expand Down
8 changes: 4 additions & 4 deletions doomsday/apps/plugins/common/src/world/p_xgsec.cpp
Expand Up @@ -962,10 +962,10 @@ dd_bool XS_GetPlane(Line* actline, Sector* sector, int ref, int* refdata,
{
LOG_AS("XS_GetPlane");

world_Material* otherMat;
coord_t otherHeight;
Sector* otherSec = NULL, *iter;
xline_t* xline;
world_Material *otherMat = NULL;
coord_t otherHeight = 0;
Sector* otherSec = NULL, *iter = NULL;
xline_t* xline = NULL;
char buff[50];

if(refdata)
Expand Down
8 changes: 4 additions & 4 deletions doomsday/apps/plugins/fmod/src/fmod_sfx.cpp
Expand Up @@ -610,10 +610,10 @@ static float logToLinear(float db)
return std::pow(10.f, db/10.f);
}

static float scaleLogarithmic(float db, float scale, de::Rangef const &range)
{
return range.clamp(linearToLog(scale * logToLinear(db)));
}
//static float scaleLogarithmic(float db, float scale, de::Rangef const &range)
//{
// return range.clamp(linearToLog(scale * logToLinear(db)));
//}

/**
* Update the ambient reverb properties.
Expand Down

0 comments on commit e20d3fe

Please sign in to comment.