diff --git a/source/graphics/UnitManager.cpp b/source/graphics/UnitManager.cpp index aa4abce789..d8604fe072 100644 --- a/source/graphics/UnitManager.cpp +++ b/source/graphics/UnitManager.cpp @@ -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; } } diff --git a/source/gui/CInput.cpp b/source/gui/CInput.cpp index 27313f23a5..c29a69f80f 100644 --- a/source/gui/CInput.cpp +++ b/source/gui/CInput.cpp @@ -1078,13 +1078,6 @@ void CInput::UpdateText(int from, int to_before, int to_after) std::list::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::iterator temp = destroy_row_to; --temp; - copy = *temp; - m_CharacterPositions.erase(destroy_row_from, destroy_row_to); } // else, the for loop will end naturally. diff --git a/source/ps/Parser.cpp b/source/ps/Parser.cpp index 173039516f..6bdde8628e 100644 --- a/source/ps/Parser.cpp +++ b/source/ps/Parser.cpp @@ -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; } diff --git a/source/scriptinterface/ScriptInterface.cpp b/source/scriptinterface/ScriptInterface.cpp index 608e1da760..babca761df 100644 --- a/source/scriptinterface/ScriptInterface.cpp +++ b/source/scriptinterface/ScriptInterface.cpp @@ -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);