Removing nested function through macro use.

This commit is contained in:
Cas Cremers 2019-01-04 17:17:07 +01:00
parent cb16a49e78
commit 8aed349139

View File

@ -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