AcademySoftwareFoundation / OpenImageIO

Reading, writing, and processing images in a wide variety of file formats, using a format-agnostic API, aimed at VFX applications.

Home Page:https://openimageio.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Wrong data type

OgreTransporter opened this issue · comments

In the commit 22ef9b2, the function std::string Filesystem::unique_path(string_view model) under Windows uses std::wstring as the data type for the variables modelStr and name. The library cannot be built because the function exists cannot be called in this way!

if (!exists(name))

Compiler error MSVC:

filesystem.cpp(526,14): error C2664: "bool OpenImageIO_v2_6_1::Filesystem::exists(OpenImageIO_v2_6_1::string_view) noexcept" : 
 Conversion of argument 1 from "std::wstring" to "OpenImageIO_v2_6_1::string_view" not possible

Sorry about that. Working on a fix right now.

Fixed proposed in #4211. Are you able to pull down that patch and try it out? If so, please let us know here.

I use the same fix. Works!