api: add OIIO_NODISCARD_ERROR to Imageio.h#5218
Conversation
Signed-off-by: Hunter <zoomhunter2010@gmail.com>
|
|
lgritz
left a comment
There was a problem hiding this comment.
All of the changes you made used OIIO_NODISCARD_ERROR, but none of the functions annotated return error codes. Those are all cases where they really do return a value, and so so should use OIIO_NODISCARD.
Also, while it's ok to just change a few functions, I'm wonder how and why you chose just these three in particular, instead of, say, choosing one class and annotating all the appropriate member functions in that class?
Fix my OIIO_NODISCARD_ERROR additions acording to comments on my pr Signed-off-by: Hunter <zoomhunter2010@gmail.com>
lgritz
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the patch.
|
Can I ask a question without it seeming accusatory? I'm always trying to learn more about how people are using coding assistants in practice. Your PR said "Assisted by: Claude Sonnet 4.6", and considering that your patch changed only 3 lines (and, um, not entirely correctly the first time), I'm really curious in what way you used the tool. What did you ask it to do, and do you feel like it saved you any time for this task? |
|
For me, I try not to let it do much of the work for me. I try to use it to explain things to me or help me skim through the larger files. I do believe it's a bad habit because it isn't always right, and it can just make stuff up. I think for this task, it didn't end up saving me time. |
|
I think that's 100% the right attitude. Our request to document LLM use with "assisted-by" is for if you are having it directly help you write the code you submit. If you're just using it to explain existing code to you, find things in a big codebase, answer general questions about programming, or even review the code you're written before you submit a PR, I don't think you need to bother with the "assisted-by." |
Description
Add OIIO_NODISCARD_ERROR to make sure callers check their bool return values
Assisted by: Claude Sonnet 4.6
Reference: #4781
Tests
No new test suite case added
Checklist:
and if I used AI coding assistants, I have an
Assisted-by: TOOL / MODELline in the pull request description above.
behavior.
PR, by pushing the changes to my fork and seeing that the automated CI
passed there. (Exceptions: If most tests pass and you can't figure out why
the remaining ones fail, it's ok to submit the PR and ask for help. Or if
any failures seem entirely unrelated to your change; sometimes things break
on the GitHub runners.)
fixed any problems reported by the clang-format CI test.
corresponding Python bindings. If altering ImageBufAlgo functions, I also
exposed the new functionality as oiiotool options.