mirror of https://github.com/AxioDL/boo.git
LtRtProcessing: Make ClampFull() internally linked
inline provides external linkage instead of internal linkage which is more desirable here. We can enclose it within an anonymous namespace to make it internally linked.
This commit is contained in:
parent
7c5a9ab4df
commit
93045d5264
|
@ -1,14 +1,15 @@
|
||||||
#include "LtRtProcessing.hpp"
|
#include "lib/audiodev/LtRtProcessing.hpp"
|
||||||
#include <cmath>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
#undef max
|
#undef max
|
||||||
|
|
||||||
namespace boo {
|
namespace boo {
|
||||||
|
namespace {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T ClampFull(float in) {
|
T ClampFull(float in) {
|
||||||
if (std::is_floating_point<T>()) {
|
if (std::is_floating_point<T>()) {
|
||||||
return std::min<T>(std::max<T>(in, -1.f), 1.f);
|
return std::min<T>(std::max<T>(in, -1.f), 1.f);
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,6 +24,7 @@ inline T ClampFull(float in) {
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
#if INTEL_IPP
|
#if INTEL_IPP
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue