Fix build issues
This commit is contained in:
@@ -53,11 +53,20 @@ namespace OpenVulkano
|
||||
value = EndianSwap(value);
|
||||
fwrite(&value, sizeof(value), 1, file);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static FILE* FOpen(const T* path)
|
||||
{
|
||||
if constexpr (std::is_same_v<T, char>)
|
||||
return fopen(path, "wb");
|
||||
else
|
||||
return _wfopen(path, "wb");
|
||||
}
|
||||
|
||||
public:
|
||||
JpegWithTagsWriter(const std::filesystem::path& filePath)
|
||||
{
|
||||
file = fopen(filePath.c_str(), "wb");
|
||||
file = FOpen(filePath.c_str());
|
||||
if (file == nullptr) throw std::runtime_error("Can't open file.");
|
||||
// Write soi marker
|
||||
fputc(0xFF, file);
|
||||
|
||||
@@ -97,8 +97,7 @@ namespace OpenVulkano::Image
|
||||
|
||||
[[maybe_unused]] XmpBuilder& XmpBuilder::SetCreateDateNow()
|
||||
{
|
||||
std::chrono::system_clock::now();
|
||||
std::time_t currentTime = std::chrono::system_clock::to_time_t(now);
|
||||
std::time_t currentTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
SetCreateDate(currentTime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user