Added missing <charconv> include
All checks were successful
/ Build the server (push) Successful in 5m29s

This commit is contained in:
Mutzi 2024-04-24 13:44:37 +02:00
parent c8d620da3a
commit 430ef15f83
Signed by: root
GPG Key ID: 2437494E09F13876
2 changed files with 3 additions and 13 deletions

View File

@ -1,9 +1,8 @@
#include <filesystem> #include <filesystem>
#include <string_view> #include <string_view>
#include <ranges> #include <ranges>
#include <fstream>
#include <deque>
#include <charconv> #include <charconv>
#include <deque>
#include "../util/miniz.hxx" #include "../util/miniz.hxx"
#include "server_internal.hxx" #include "server_internal.hxx"

View File

@ -1,22 +1,13 @@
#include <fstream> #include <charconv>
#include <spdlog/spdlog.h> #include <spdlog/spdlog.h>
#include <stb_image.h> #include <stb_image.h>
#include <stb_image_resize2.h> #include <stb_image_resize2.h>
#include <stb_image_write.h> #include <stb_image_write.h>
#include "server_internal.hxx" #include "server_internal.hxx"
static constexpr std::size_t chunk_size = 1024*1024, max_image_size = 1024*1024*50, preview_size=480; static constexpr std::size_t max_image_size = 1024*1024*50, preview_size=480;
static const std::set<std::string> image_extension = {".png", ".jpg", ".jpeg", ".tga", ".bmp", ".psd", ".gif", ".jfif", ".pjpeg", ".pjp"}; static const std::set<std::string> image_extension = {".png", ".jpg", ".jpeg", ".tga", ".bmp", ".psd", ".gif", ".jfif", ".pjpeg", ".pjp"};
struct UploadInfo {
Server *server;
std::shared_lock<std::shared_mutex> node_lock;
std::size_t to_read;
std::filesystem::path path;
std::ofstream file;
std::shared_ptr<Node> node;
};
void make_preview(std::filesystem::path &path, const std::shared_ptr<Node> &node) { void make_preview(std::filesystem::path &path, const std::shared_ptr<Node> &node) {
int x, y, channels; int x, y, channels;
auto img = std::unique_ptr<stbi_uc, decltype(&free)> auto img = std::unique_ptr<stbi_uc, decltype(&free)>