Clang-tidy: ParameterCase
This commit is contained in:
parent
fc353fc799
commit
ecea12fc15
24 changed files with 228 additions and 229 deletions
|
|
@ -51,7 +51,7 @@ int8_t path_directions[9] = { 5, 1, 6, 2, 0, 3, 8, 4, 7 };
|
|||
* check that each step is a valid position. Store the step directions (see
|
||||
* path_directions) in path, which must have room for 24 steps
|
||||
*/
|
||||
int FindPath(bool (*PosOk)(int, Point), int PosOkArg, int sx, int sy, int dx, int dy, int8_t path[MAX_PATH_LENGTH])
|
||||
int FindPath(bool (*posOk)(int, Point), int posOkArg, int sx, int sy, int dx, int dy, int8_t path[MAX_PATH_LENGTH])
|
||||
{
|
||||
// clear all nodes, create root nodes for the visited/frontier linked lists
|
||||
gdwCurNodes = 0;
|
||||
|
|
@ -87,7 +87,7 @@ int FindPath(bool (*PosOk)(int, Point), int PosOkArg, int sx, int sy, int dx, in
|
|||
return 0;
|
||||
}
|
||||
// ran out of nodes, abort!
|
||||
if (!path_get_path(PosOk, PosOkArg, next_node, dx, dy))
|
||||
if (!path_get_path(posOk, posOkArg, next_node, dx, dy))
|
||||
return 0;
|
||||
}
|
||||
// frontier is empty, no path!
|
||||
|
|
@ -177,12 +177,12 @@ bool path_solid_pieces(PATHNODE *pPath, int dx, int dy)
|
|||
*
|
||||
* @return false if we ran out of preallocated nodes to use, else true
|
||||
*/
|
||||
bool path_get_path(bool (*PosOk)(int, Point), int PosOkArg, PATHNODE *pPath, int x, int y)
|
||||
bool path_get_path(bool (*posOk)(int, Point), int posOkArg, PATHNODE *pPath, int x, int y)
|
||||
{
|
||||
for (int i = 0; i < 8; i++) {
|
||||
int dx = pPath->position.x + pathxdir[i];
|
||||
int dy = pPath->position.y + pathydir[i];
|
||||
bool ok = PosOk(PosOkArg, { dx, dy });
|
||||
bool ok = posOk(posOkArg, { dx, dy });
|
||||
if ((ok && path_solid_pieces(pPath, dx, dy)) || (!ok && dx == x && dy == y)) {
|
||||
if (!path_parent_path(pPath, dx, dy, x, y))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue