Fix image cache

This commit is contained in:
badaix 2021-12-19 14:20:21 +01:00
parent 9c0c3bf0be
commit e59f628e5f

View file

@ -19,14 +19,19 @@
#ifndef IMAGE_CACHE_HPP
#define IMAGE_CACHE_HPP
// 3rd party headers
#include <boost/algorithm/hex.hpp>
#include <boost/uuid/detail/md5.hpp>
// standard headers
#include <iostream>
#include <map>
#include <mutex>
#include <optional>
#include <regex>
#include <string>
#include <boost/algorithm/hex.hpp>
#include <boost/uuid/detail/md5.hpp>
class ImageCache
{
@ -56,7 +61,7 @@ public:
ext = ext.substr(1);
filename += "." + ext;
std::lock_guard<std::mutex> lock(mutex_);
key_to_url_[key] = std::move(filename);
key_to_url_[key] = filename;
url_to_data_[filename] = std::move(image);
return filename;
};