diff --git a/FalloutScriptStore.cpp b/FalloutScriptStore.cpp index d61581d..e7ef3b3 100644 --- a/FalloutScriptStore.cpp +++ b/FalloutScriptStore.cpp @@ -303,7 +303,7 @@ void CFalloutScript::StoreDeclarations() } // Empty procedure - if (m_ProcTable.GetSizeOfProc(i) == 0) + if (m_ProcTable.GetSizeOfProc(i) == 0 && (m_ProcTable[i].m_ulType & P_IMPORT) == 0) { g_ofstream << "/*******************************************************" << std::endl << "* Found Procedure without body. *" << std::endl diff --git a/Opcode.cpp b/Opcode.cpp index a8fd9fe..157df3e 100644 --- a/Opcode.cpp +++ b/Opcode.cpp @@ -57,8 +57,6 @@ void COpcode::Serialize() throw std::exception(); } - - if ((m_wOperator < O_OPERATOR) || ((m_wOperator >= O_END_OP) && (m_wOperator != O_STRINGOP) && @@ -102,39 +100,6 @@ void COpcode::Expect(uint16_t wOperator, bool bArgumentFound, uint32_t ulArgumen } } -void COpcode::Expect(int nCount, uint16_t pwOperators[]) -{ - Serialize(); - bool bFound = false; - - for(int i = 0; i < nCount; i++) - { - if (m_wOperator == pwOperators[i]) - { - bFound = true; - break; - } - } - - if (!bFound) - { - printf("Error: Unexpected opcode ("); - - for(int i = 0; i < nCount; i++) - { - if (i != 0) - { - printf(" or "); - } - - printf("0x%04X", pwOperators[i]); - } - - printf(" expected, but 0x%04X found)\n", m_wOperator); - throw std::exception(); - } -} - bool COpcode::HasArgument() const { return ((m_wOperator == O_STRINGOP) || (m_wOperator == O_FLOATOP) || (m_wOperator == O_INTOP)); diff --git a/Opcode.h b/Opcode.h index 57947da..b71125f 100644 --- a/Opcode.h +++ b/Opcode.h @@ -856,7 +856,6 @@ public: public: virtual void Serialize(); void Expect(uint16_t wOperator, bool bArgumentFound = false, uint32_t ulArgument = 0); - void Expect(int nCount, uint16_t pwOperators[]); bool HasArgument() const; int GetSize() const; diff --git a/main.cpp b/main.cpp index 6d1314a..dadc887 100644 --- a/main.cpp +++ b/main.cpp @@ -111,7 +111,7 @@ int main(int argc, char* argv[]) } } - catch (const std::exception& e) + catch (const std::exception&) { // Error message already displayed if (g_bStopOnError == true)