Skip to content
Snippets Groups Projects
Commit da070b57 authored by mattijs's avatar mattijs
Browse files

ENH: transform: support for unsigned int

parent 302b4443
No related branches found
No related tags found
No related merge requests found
...@@ -172,6 +172,20 @@ inline label invTransform(const tensor&, const label i) ...@@ -172,6 +172,20 @@ inline label invTransform(const tensor&, const label i)
} }
//- No-op rotational transform of an unsigned integer
inline unsigned int transform(const tensor&, const unsigned int i)
{
return i;
}
//- No-op inverse rotational transform of an unsigned integer
inline unsigned int invTransform(const tensor&, const unsigned int i)
{
return i;
}
//- No-op rotational transform of a scalar //- No-op rotational transform of a scalar
inline scalar transform(const tensor&, const scalar s) inline scalar transform(const tensor&, const scalar s)
{ {
......
  • Maintainer

    Might make sense to replace all of these with a generic version (untested):

    template<class T>
    typename std::enable_if<std::is_arithmetic<T>::value, T>::type
    transform(const tensor&, const T val)
    {
        return val;
    }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment