Fix GCC 4.6 "set but not used" warnings
This was SVN commit r9194.
This commit is contained in:
parent
2b138f47db
commit
e5e9e38532
@ -93,8 +93,6 @@ CUnit* CUnitManager::PickUnit(const CVector3D& origin, const CVector3D& dir) con
|
||||
{
|
||||
// closest object found so far
|
||||
CUnit* hit = 0;
|
||||
// distance to closest object found so far
|
||||
float dist = FLT_MAX;
|
||||
// closest approach offset (easier to pick small stuff in forests than standard ScEd style selection)
|
||||
float minrel = FLT_MAX;
|
||||
|
||||
@ -115,7 +113,6 @@ CUnit* CUnitManager::PickUnit(const CVector3D& origin, const CVector3D& dir) con
|
||||
float rel = offset.Length();
|
||||
if (rel < minrel) {
|
||||
hit = unit;
|
||||
dist = tmin;
|
||||
minrel = rel;
|
||||
}
|
||||
}
|
||||
|
@ -1078,13 +1078,6 @@ void CInput::UpdateText(int from, int to_before, int to_after)
|
||||
|
||||
std::list<SRow>::iterator current_line;
|
||||
|
||||
// used to replace the last updated copy, because it might contain a "space"
|
||||
// in the end, which shouldn't be there because of word-wrapping. the only
|
||||
// way to know is to keep on going, but we don't want that, so we'll store
|
||||
// a copy.
|
||||
SRow copy;
|
||||
bool copy_used=false;
|
||||
|
||||
// Used to ... TODO
|
||||
int check_point_row_start = -1;
|
||||
int check_point_row_end = -1;
|
||||
@ -1394,14 +1387,10 @@ void CInput::UpdateText(int from, int to_before, int to_after)
|
||||
// in the coming erase.
|
||||
current_line = destroy_row_to;
|
||||
|
||||
copy_used = true;
|
||||
|
||||
std::list<SRow>::iterator temp = destroy_row_to;
|
||||
|
||||
--temp;
|
||||
|
||||
copy = *temp;
|
||||
|
||||
m_CharacterPositions.erase(destroy_row_from, destroy_row_to);
|
||||
}
|
||||
// else, the for loop will end naturally.
|
||||
|
@ -822,9 +822,6 @@ bool CParser::InputTaskType(const std::string& strName, const std::string& strSy
|
||||
bool Extract = false;
|
||||
bool Error = false;
|
||||
size_t i;
|
||||
bool ConstructNew = false; // If it's the first input, then don't
|
||||
// construct a new node, because we
|
||||
// we already have m_BaseNode
|
||||
|
||||
// Construct base node
|
||||
TaskType.m_BaseNode = new CParserTaskTypeNode();
|
||||
@ -899,8 +896,6 @@ next [a] Null [a] <-- added NewNode
|
||||
// Set to current
|
||||
CurNode = CurNode->m_AltNode;
|
||||
|
||||
ConstructNew = false;
|
||||
|
||||
// We're done extracting for now
|
||||
continue;
|
||||
}
|
||||
|
@ -449,6 +449,7 @@ ScriptInterface_impl::ScriptInterface_impl(const char* nativeScopeName, const sh
|
||||
|
||||
m_glob = JS_NewGlobalObject(m_cx, &global_class);
|
||||
ok = JS_InitStandardClasses(m_cx, m_glob);
|
||||
debug_assert(ok);
|
||||
|
||||
JS_DefineProperty(m_cx, m_glob, "global", OBJECT_TO_JSVAL(m_glob), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY
|
||||
| JSPROP_PERMANENT);
|
||||
|
Loading…
Reference in New Issue
Block a user