Removing nested function through macro use.
This commit is contained in:
parent
cb16a49e78
commit
8aed349139
@ -37,6 +37,14 @@
|
||||
#include "error.h"
|
||||
#include "knowledge.h"
|
||||
|
||||
#define erode(deltaw) { \
|
||||
if (smode & 1) \
|
||||
{ \
|
||||
w = w + (deltaw); \
|
||||
} \
|
||||
smode = smode / 2; \
|
||||
}
|
||||
|
||||
//! Trivial goal detection
|
||||
/**
|
||||
* Detect goals that we do not need to solve because they can be trivially solved.
|
||||
@ -352,15 +360,6 @@ computeGoalWeight (const System sys, const Binding b)
|
||||
int smode;
|
||||
Term t;
|
||||
|
||||
void erode (const float deltaw)
|
||||
{
|
||||
if (smode & 1)
|
||||
{
|
||||
w = w + deltaw;
|
||||
}
|
||||
smode = smode / 2;
|
||||
}
|
||||
|
||||
// Total weight
|
||||
w = 0;
|
||||
// We will shift this mode variable
|
||||
|
Loading…
Reference in New Issue
Block a user