fix: manual implementation of ranges::to as this is not supported by gcc 13

This commit is contained in:
djaidjai committed 2024-04-23 15:02:06 +02:00
1 parent d06f287a91
commit 855ac4d654
5 files changed
+22 -19

No files matched your search

+4 -6
View File
@@ -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);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.