wrap global function in anonymous namespace
This commit is contained in:
+10
-10
@@ -6,20 +6,20 @@
|
|||||||
|
|
||||||
using namespace StepParity;
|
using namespace StepParity;
|
||||||
|
|
||||||
|
namespace {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool isEmpty(const std::vector<T> & vec, int columnCount) {
|
bool isEmpty(const std::vector<T> & vec, int columnCount) {
|
||||||
for (int i = 0; i < columnCount; i++)
|
for (int i = 0; i < columnCount; i++)
|
||||||
{
|
|
||||||
if(static_cast<int>(vec[i]) != 0)
|
|
||||||
{
|
{
|
||||||
return false;
|
if(static_cast<int>(vec[i]) != 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float StepParityCost::getActionCost(State * initialState, State * resultState, std::vector<Row>& rows, int rowIndex, float elapsedTime)
|
float StepParityCost::getActionCost(State * initialState, State * resultState, std::vector<Row>& rows, int rowIndex, float elapsedTime)
|
||||||
{
|
{
|
||||||
Row &row = rows[rowIndex];
|
Row &row = rows[rowIndex];
|
||||||
@@ -339,7 +339,7 @@ float StepParityCost::calcTwistedFootCost(State * resultState)
|
|||||||
{
|
{
|
||||||
cost += TWISTED_FOOT;
|
cost += TWISTED_FOOT;
|
||||||
}
|
}
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
float StepParityCost::calcMissedFootswitchCost(Row & row, bool jackedLeft, bool jackedRight, int columnCount)
|
float StepParityCost::calcMissedFootswitchCost(Row & row, bool jackedLeft, bool jackedRight, int columnCount)
|
||||||
|
|||||||
Reference in New Issue
Block a user