Ticket #4191: 0001-Remove-unused-function-for-the-AI-connectivity-grid.patch

File 0001-Remove-unused-function-for-the-AI-connectivity-grid.patch, 1.7 KB (added by Itms, 8 years ago)
  • source/simulation2/components/CCmpAIManager.cpp

    From 2a52d2ccb4a4edc55734b9e1993277b622a0f166 Mon Sep 17 00:00:00 2001
    From: na-Itms <na.itms76@gmail.com>
    Date: Sun, 4 Sep 2016 19:52:21 +0200
    Subject: [PATCH 1/3] Remove unused function for the AI connectivity grid
    
    ---
     source/simulation2/components/CCmpAIManager.cpp | 12 ------------
     1 file changed, 12 deletions(-)
    
    diff --git a/source/simulation2/components/CCmpAIManager.cpp b/source/simulation2/components/CCmpAIManager.cpp
    index eedc18b..e1f7475 100644
    a b public:  
    225225        m_ScriptInterface->RegisterFunction<void, CAIWorker::ForceGC>("ForceGC");
    226226
    227227        m_ScriptInterface->RegisterFunction<JS::Value, JS::HandleValue, JS::HandleValue, pass_class_t, CAIWorker::ComputePath>("ComputePath");
    228         m_ScriptInterface->RegisterFunction<JS::Value, pass_class_t, CAIWorker::GetConnectivityGrid>("GetConnectivityGrid");
    229228
    230229        m_ScriptInterface->RegisterFunction<void, std::wstring, std::vector<u32>, u32, u32, u32, CAIWorker::DumpImage>("DumpImage");
    231230    }
    public:  
    322321            waypoints.emplace_back(wp.x, wp.z);
    323322    }
    324323
    325     static JS::Value GetConnectivityGrid(ScriptInterface::CxPrivate* pCxPrivate, pass_class_t passClass)
    326     {
    327         ENSURE(pCxPrivate->pCBData);
    328         CAIWorker* self = static_cast<CAIWorker*> (pCxPrivate->pCBData);
    329         JSContext* cx(self->m_ScriptInterface->GetContext());
    330 
    331         JS::RootedValue retVal(cx);
    332         self->m_ScriptInterface->ToJSVal<Grid<u16> >(cx, &retVal, self->m_LongPathfinder.GetConnectivityGrid(passClass));
    333         return retVal;
    334     }
    335 
    336324    static void ForceGC(ScriptInterface::CxPrivate* pCxPrivate)
    337325    {
    338326        PROFILE3("AI compute GC");