Fix build

This commit is contained in:
Prokhorov Kirill
2025-07-10 18:27:15 +03:00
parent 29355d337b
commit f5ddf8c6ce
3 changed files with 18 additions and 14 deletions

View File

@ -1,6 +1,19 @@
#include "heif.h"
#include "../../common/File.h"
#include <functional>
#define CONCAT_IMPL(x, y) x##y
#define CONCAT(x, y) CONCAT_IMPL(x, y)
#define defer(code) Defer CONCAT(_defer_, __COUNTER__)([&](){code;})
class Defer {
std::function<void()> func;
public:
explicit Defer(std::function<void()> func) : func(func) {}
~Defer() { func(); }
};
namespace NSHeif {
bool CHeifFile::isHeif(const std::wstring& fileName)
{

View File

@ -1,20 +1,8 @@
#include "../BgraFrame.h"
#include "../../Common/3dParty/heif/libheif/libheif/api/libheif/heif.h"
#include "../../UnicodeConverter/UnicodeConverter.h"
#include <functional>
namespace NSHeif {
#define CONCAT_IMPL(x, y) x##y
#define CONCAT(x, y) CONCAT_IMPL(x, y)
#define defer(code) Defer CONCAT(_defer_, __COUNTER__)([&](){code;})
class Defer {
std::function<void()> func;
public:
explicit Defer(std::function<void()> func) : func(func) {}
~Defer() { func(); }
};
class GRAPHICS_DECL CHeifFile {
private:
CHeifFile() = delete;