diff options
author | kcat <[email protected]> | 2019-07-14 03:58:38 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-07-14 03:58:38 -0700 |
commit | d2f71ae42a3527b9268d50ef873526d02abc7f49 (patch) | |
tree | 0165e88ee8a515fb4b147c8000220dba563246dc | |
parent | 363e2fb73a6dea31db4164531016879aa188da84 (diff) | |
parent | 4027664fc2d73656d7ec223fb3946d501baa433f (diff) |
Merge pull request #314 from PenguinDOOM/pr-master
Fixed makemhr and sofa-info errors
-rw-r--r-- | utils/makemhr/loaddef.cpp | 1 | ||||
-rw-r--r-- | utils/sofa-info.cpp | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/utils/makemhr/loaddef.cpp b/utils/makemhr/loaddef.cpp index d3962c16..28f2e1b0 100644 --- a/utils/makemhr/loaddef.cpp +++ b/utils/makemhr/loaddef.cpp @@ -24,6 +24,7 @@ #include <cstring> #include <cstdarg> #include <limits> +#include <algorithm> #include "mysofa.h" diff --git a/utils/sofa-info.cpp b/utils/sofa-info.cpp index e31ca654..c7c7a8f7 100644 --- a/utils/sofa-info.cpp +++ b/utils/sofa-info.cpp @@ -207,9 +207,7 @@ static void PrintCompatibleLayout(const uint m, const float *xyzs) mysofa_c2s(&aers[i]); } - uint fdCount{GetUniquelySortedElems(m, aers.data(), 2, - (const float*[3]){ nullptr, nullptr, nullptr }, (const float[3]){ 0.1f, 0.1f, 0.001f }, - elems.data())}; + uint fdCount{GetUniquelySortedElems(m, aers.data(), 2, { nullptr, nullptr, nullptr }, { 0.1f, 0.1f, 0.001f }, elems.data())}; if(fdCount > (m / 3)) { fprintf(stdout, "Incompatible layout (inumerable radii).\n"); @@ -223,9 +221,7 @@ static void PrintCompatibleLayout(const uint m, const float *xyzs) for(uint fi{0u};fi < fdCount;fi++) { float dist{fds[fi].mDistance}; - uint evCount{GetUniquelySortedElems(m, aers.data(), 1, - (const float*[3]){ nullptr, nullptr, &dist }, (const float[3]){ 0.1f, 0.1f, 0.001f }, - elems.data())}; + uint evCount{GetUniquelySortedElems(m, aers.data(), 1, { nullptr, nullptr, &dist }, { 0.1f, 0.1f, 0.001f }, elems.data())}; if(evCount > (m / 3)) { @@ -268,9 +264,7 @@ static void PrintCompatibleLayout(const uint m, const float *xyzs) for(uint ei{evStart};ei < evCount;ei++) { float ev{-90.0f + ei * 180.0f / (evCount - 1)}; - uint azCount{GetUniquelySortedElems(m, aers.data(), 0, - (const float*[3]){ nullptr, &ev, &dist }, (const float[3]){ 0.1f, 0.1f, 0.001f }, - elems.data())}; + uint azCount{GetUniquelySortedElems(m, aers.data(), 0, { nullptr, &ev, &dist }, { 0.1f, 0.1f, 0.001f }, elems.data())}; if(azCount > (m / 3)) { |