fix: manual implementation of ranges::to as this is not supported by gcc 13
This commit is contained in:
1 parent
d06f287a91
commit
855ac4d654
5 files changed
+22
-19
No files matched your search
@@ -1,8 +1,8 @@
|
||||
#include <cmath>
|
||||
#include <ranges>
|
||||
#include <print>
|
||||
|
||||
#include "interpolate.h"
|
||||
#include "to_vector.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -41,11 +41,9 @@ Vel bilinearInterpolate(const UVGrid &uvGrid, int time, double lat, double lon)
|
||||
}
|
||||
|
||||
vector<Vel> bilinearInterpolate(const UVGrid &uvGrid, vector<tuple<int, double, double>> points) {
|
||||
auto results = points
|
||||
| std::views::transform([&uvGrid](const auto &point) {
|
||||
auto results = points | std::views::transform([&uvGrid](const auto &point) {
|
||||
auto [time, lat, lon] = point;
|
||||
return bilinearInterpolate(uvGrid, time, lat, lon);
|
||||
})
|
||||
| std::ranges::to<std::vector<Vel>>();
|
||||
return results;
|
||||
});
|
||||
return to_vector(results);
|
||||
}
|
||||