(Windows) Fixed a compiler error and two warnings.

This commit is contained in:
Leon Styhre 2021-05-30 20:52:19 +02:00
parent 4533409c65
commit 89c845b4d5
2 changed files with 4 additions and 3 deletions

View file

@ -269,7 +269,7 @@ MDResolveHandle::MDResolveHandle(const ScraperSearchResult& result,
FIMEMORY* memoryStream = FreeImage_OpenMemory(
reinterpret_cast<BYTE*>(&mResult.thumbnailImageData.at(0)),
mResult.thumbnailImageData.size());
static_cast<DWORD>(mResult.thumbnailImageData.size()));
FREE_IMAGE_FORMAT imageFormat = FreeImage_GetFileTypeFromMemory(memoryStream, 0);
FreeImage_CloseMemory(memoryStream);
@ -429,7 +429,8 @@ void MediaDownloadHandle::update()
std::string imageData = mReq->getContent();
FIMEMORY* memoryStream = FreeImage_OpenMemory(
reinterpret_cast<BYTE*>(&imageData.at(0)), imageData.size());
reinterpret_cast<BYTE*>(&imageData.at(0)),
static_cast<DWORD>(imageData.size()));
imageFormat = FreeImage_GetFileTypeFromMemory(memoryStream, 0);
FreeImage_CloseMemory(memoryStream);

View file

@ -177,7 +177,7 @@ namespace Utils
const char* f = format.c_str();
tm timeStruct;
#if defined(_WIN64)
localtime_s(&timeStruct, &_time);
localtime_s(&timeStruct, &time);
#else
localtime_r(&time, &timeStruct);
#endif