#include "CalculatorBase.h"
#include <algorithm>
#include <cmath>
#include "common.h"

namespace tilegen
{
namespace alpha
{

CalculatorBase::CalculatorBase():
    mAlphas((int)CORNERS)
{
    zeroAlphas();
}

void CalculatorBase::zeroAlphas()
{
    for (auto& alpha : mAlphas)
        alpha = 0;
}

sf::Uint8 & CalculatorBase::getAlpha(size_t index)
{
    return mAlphas[index];
}

const CalculatorBase::Alphas & CalculatorBase::getAlphas() const
{
    return mAlphas;
}

void CalculatorBase::updateAlphas(const Weights & weights)
{
    zeroAlphas();
    for (double weight : weights)
    {
        if(!std::isfinite(weight))
            return;
    }
    updateAlphasAux(weights);
}

} // namespace alpha
} // namespace tilegen

#include "CalculatorBase.h"
#include <algorithm>
#include <numeric>
#include "common.h"

namespace tilegen
{
namespace alpha
{

CalculatorBase::CalculatorBase():
    mAlphas((int)CORNERS)
{
    zeroAlphas();
}

void CalculatorBase::zeroAlphas()
{
    for (auto& alpha : mAlphas)
        alpha = 0;
}

sf::Uint8 & CalculatorBase::getAlpha(size_t index)
{
    return mAlphas[index];
}

const CalculatorBase::Alphas & CalculatorBase::getAlphas() const
{
    return mAlphas;
}

void CalculatorBase::updateAlphas(const Weights & weights)
{
    zeroAlphas();
    for (double weight : weights)
    {
        if(!isfinite(weight))
            return;
    }
    updateAlphasAux(weights);
}

} // namespace alpha
} // namespace tilegen

--- 
+++ 
@@ -1,6 +1,6 @@
 #include "CalculatorBase.h"
 #include <algorithm>
-#include <numeric>
+#include <cmath>
 #include "common.h"
 
 namespace tilegen
@@ -35,7 +35,7 @@
     zeroAlphas();
     for (double weight : weights)
     {
-        if(!isfinite(weight))
+        if(!std::isfinite(weight))
             return;
     }
     updateAlphasAux(weights);
Use correct header and namespace for isfinite
