Skip to content

Commit

Permalink
Remove references to tr1
Browse files Browse the repository at this point in the history
  • Loading branch information
pdesaulniers committed Jun 10, 2023
1 parent 995dc9f commit 1587905
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
7 changes: 0 additions & 7 deletions libs/DSPFilters/include/DspFilters/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,4 @@ THE SOFTWARE.
#include <vector>
#include <algorithm>

#ifdef _MSC_VER
namespace tr1 = std::tr1;
#else
namespace tr1 = std;
#endif


#endif
59 changes: 0 additions & 59 deletions libs/DSPFilters/include/DspFilters/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,63 +476,6 @@ void validate (int numChannels, int numSamples, T const* const* src)

//--------------------------------------------------------------------------

#if 0
/*
* this stuff all depends on is_pod which is not always available
*
*/
namespace detail {

template <typename Ty,
bool isPod>
struct zero
{
static void process (int samples,
Ty* dest,
int destSkip)
{
if (destSkip != 0)
{
++destSkip;
while (--samples >= 0)
{
*dest = Ty();
dest += destSkip;
}
}
else
{
std::fill (dest, dest + samples, Ty());
}
}
};

template <typename Ty>
struct zero<Ty, true>
{
static void process (int samples,
Ty* dest,
int destSkip)
{
if (destSkip != 0)
zero<Ty,false>::process (samples, dest, destSkip);
else
::memset (dest, 0, samples * sizeof(dest[0]));
}
};

}

// Fill a channel with zeros. This works even if Ty is not a basic type.
template <typename Ty>
void zero (int samples,
Ty* dest,
int destSkip = 0)
{
detail::zero<Ty, tr1::is_pod<Ty>::value>::process (samples, dest, destSkip );
}

#else
// Fill a channel with zeros. This works even if Ty is not a basic type.
template <typename Ty>
void zero (int samples,
Expand All @@ -554,8 +497,6 @@ void zero (int samples,
}
}

#endif

// Fill a set of channels with zero.
template <typename Ty>
void zero (int channels,
Expand Down

0 comments on commit 1587905

Please sign in to comment.