Skip to content

Commit b2065ca

Browse files
Add OIIO_NODISCARD to ImageInput::open overloads
1 parent 977e2f9 commit b2065ca

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/include/OpenImageIO/imageio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -985,12 +985,12 @@ class OIIO_API ImageInput {
985985
/// A `unique_ptr` that will close and free the ImageInput when
986986
/// it exits scope or is reset. The pointer will be empty if the
987987
/// required writer was not able to be created.
988-
OIIO_NODISCARD_ERROR static unique_ptr open (const std::string& filename,
988+
OIIO_NODISCARD static unique_ptr open (const std::string& filename,
989989
const ImageSpec *config = nullptr,
990990
Filesystem::IOProxy* ioproxy = nullptr);
991991

992992
/// Create and open an ImageInput using a UTF-16 encoded wstring filename.
993-
OIIO_NODISCARD_ERROR static unique_ptr open (const std::wstring& filename,
993+
OIIO_NODISCARD static unique_ptr open (const std::wstring& filename,
994994
const ImageSpec *config = nullptr,
995995
Filesystem::IOProxy* ioproxy = nullptr) {
996996
return open(Strutil::utf16_to_utf8(filename), config, ioproxy);
@@ -1143,10 +1143,10 @@ class OIIO_API ImageInput {
11431143
///
11441144
/// @returns
11451145
/// `true` upon success, or `false` upon failure.
1146-
virtual bool valid_file (const std::string& filename) const;
1146+
OIIO_NODISCARD_ERROR virtual bool valid_file (const std::string& filename) const;
11471147

11481148
/// Check valid file using a UTF-16 encoded wstring filename.
1149-
bool valid_file (const std::wstring& filename) const {
1149+
OIIO_NODISCARD_ERROR bool valid_file (const std::wstring& filename) const {
11501150
return valid_file(Strutil::utf16_to_utf8(filename));
11511151
}
11521152

0 commit comments

Comments
 (0)