Fix Android Zip changes

This commit is contained in:
Michał Janiszewski 2018-05-09 15:59:05 +02:00
parent 7b8507cb22
commit d965553cae
2 changed files with 5 additions and 5 deletions

View File

@ -119,7 +119,7 @@ public:
return std::vector<uint8>(dataPtr, dataPtr + dataSize);
}
void void SetFileData(const std::string_view& path, std::vector<uint8>&& data) override
void SetFileData(const std::string_view& path, std::vector<uint8>&& data) override
{
STUB();
}
@ -139,15 +139,15 @@ namespace Zip
{
std::unique_ptr<IZipArchive> Open(const std::string_view& path, ZIP_ACCESS access)
{
return new ZipArchive(path, access);
return std::make_unique<ZipArchive>(path, access);
}
std::unique_ptr<IZipArchive> TryOpen(const std::string_view path, ZIP_ACCESS access)
std::unique_ptr<IZipArchive> TryOpen(const std::string_view& path, ZIP_ACCESS access)
{
std::unique_ptr<IZipArchive> result;
try
{
result = new ZipArchive(path, access);
result = std::make_unique<ZipArchive>(path, access);
}
catch (const std::exception&)
{

View File

@ -501,7 +501,7 @@ private:
w->saved_view_x = gSavedViewX;
w->saved_view_y = gSavedViewY;
char zoomDifference = gSavedViewZoom - w->viewport->zoom;
sint8 zoomDifference = gSavedViewZoom - w->viewport->zoom;
w->viewport->zoom = gSavedViewZoom;
gCurrentRotation = gSavedViewRotation;
if (zoomDifference != 0)