api: imagebuf.h add deprecation warnings to deprecated things (#4341)
* Add deprecation warnings to the varieties of ImageBuf constructor and `reset()` that don't take subimage and miplevel parameters. The equivalent is to just pass `0` for both of those parameters. The warned constructors have been marked as deprecated since OIIO 2.2. * The misspelled `ImageBuf::make_writeable()` has been given deprecation warnings. Since OIIO 2.2, the correct spelling is `make_writable`. * The `ImageBuf::error()` method that uses printf-style formatting now has deprecation warnings. Use `ImageBuf::errorfmt()` instead. * The `ImageBuf::interppixel_NDC_full()` method, which has been marked as deprecated since OIIO 1.5, now has deprecation warnings. Use `interppixel_NDC()` instead. Undeprecate the name+spec varieties of constructors. They were documented as deprecated but warnings were never added. In doing this set of changes, I realized that they were used for something useful after all -- it makes it easy to remember the name of a new buffer you're making not from a file, so you can later `write()` it without needing to know the filename at that time. I also added a new `set_name()` method to do it directly for times when you don't want to rely on the constructor or want to change the name. By the way, I'm being careful also to convert all the warned or marked deprecated functions to inline, if at all possible, so that in the future removing them will not be an ABI break. Signed-off-by: Larry Gritz <lg@larrygritz.com>
This commit is contained in:
@@ -67,19 +67,27 @@ long-deprecated API facets. This document lists the deprecations and removals.
|
||||
severefmt, messagefmt, debugfmt, respectively, which all use the std::format
|
||||
notation.
|
||||
|
||||
## imagebuf.h
|
||||
|
||||
* Add deprecation warnings to the varieties of ImageBuf constructor and
|
||||
`reset()` that don't take subimage and miplevel parameters, which have been
|
||||
marked as deprecated since OIIO 2.2. The equivalent is to just pass `0` for
|
||||
both of those parameters.
|
||||
* The misspelled `ImageBuf::make_writeable()` has been given deprecation
|
||||
warnings. Since OIIO 2.2, we have used the correct spelling,
|
||||
`make_writable`.
|
||||
* The `ImageBuf::error()` method that uses printf-style formatting conventions
|
||||
now has deprecation warnings. Use `ImageBuf::errorfmt()` instead.
|
||||
* The `ImageBuf::interppixel_NDC_full()` method, which has been marked as
|
||||
deprecated since OIIO 1.5, now has deprecation warnings. Use
|
||||
`interppixel_NDC()` instead.
|
||||
|
||||
## missingmath.h
|
||||
|
||||
* This header has been removed entirely. It has was originally needed for
|
||||
pre-C++11 MSVS, but has been unused since OIIO 2.0 (other than transitively
|
||||
including fmath.h).
|
||||
|
||||
## parallel.h
|
||||
|
||||
* Removed several varieties of `parallel_for` functions where the task
|
||||
functions took a thread ID argument in addition to the range, which have
|
||||
been considered deprecated since OIIO 2.3. Please use task functions that do
|
||||
not take a thread ID parameter.
|
||||
|
||||
## paramlist.h
|
||||
|
||||
* Removed some ParamValue constructor variants that have been deprecated since
|
||||
@@ -88,6 +96,13 @@ long-deprecated API facets. This document lists the deprecations and removals.
|
||||
behavior, please use the newer variety of constructors that instead use a
|
||||
"strong" type where you pass `ParamValue:Copy(bool)`.
|
||||
|
||||
## parallel.h
|
||||
|
||||
* Removed several varieties of `parallel_for` functions where the task
|
||||
functions took a thread ID argument in addition to the range, which have
|
||||
been considered deprecated since OIIO 2.3. Please use task functions that do
|
||||
not take a thread ID parameter.
|
||||
|
||||
## strutil.h
|
||||
|
||||
* Added deprecation warnings to all the old (printf-convention) string
|
||||
|
||||
Reference in New Issue
Block a user