Skip to content

Commit 82cfab7

Browse files
committed
fix(oiiotool): handle reset() return in set_colorconfig
OIIO_NODISCARD_ERROR added to ColorConfig::reset() in color.h requires updating set_colorconfig to use the return value. Replaced the has_error() check with a direct check of bool return from reset(). Signed-off-by: Luna Kim <177369799+luna-y-kim@users.noreply.github.com>
1 parent 705331f commit 82cfab7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/oiiotool/oiiotool.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,8 +2325,7 @@ static void
23252325
set_colorconfig(Oiiotool& ot, cspan<const char*> argv)
23262326
{
23272327
OIIO_DASSERT(argv.size() == 2);
2328-
ot.colorconfig().reset(argv[1]);
2329-
if (ot.colorconfig().has_error()) {
2328+
if (!ot.colorconfig().reset(argv[1])) {
23302329
ot.errorfmt("--colorconfig", "{}", ot.colorconfig().geterror());
23312330
}
23322331
}

0 commit comments

Comments
 (0)