Skip to content

Commit eb40572

Browse files
committed
api: errorhandler.h remove deprecated old printf style methods
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent a96e10c commit eb40572

File tree

2 files changed

+0
-125
lines changed

2 files changed

+0
-125
lines changed

src/doc/Doxyfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,6 @@ PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \
21942194
OIIO_NODISCARD:= \
21952195
OIIO_DEPRECATED:=[[deprecated]] \
21962196
OIIO_FORMAT_DEPRECATED:= \
2197-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED:= \
21982197
OIIO_FORCEINLINE=inline \
21992198
IMATH_HALF_H_=1 \
22002199
INCLUDED_IMATHVEC_H=1 \

src/include/OpenImageIO/errorhandler.h

Lines changed: 0 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@
1010
#include <OpenImageIO/strutil.h>
1111

1212

13-
// If OIIO_ERRORHANDLER_HIDE_PRINTF is defined, mark the old-style printf-like
14-
// format functions as deprecated. (This is a debugging aid for downstream
15-
// projects who want to root out any places where they might be using the old
16-
// one).
17-
#if defined(OIIO_ERRORHANDLER_HIDE_PRINTF) || defined(OIIO_INTERNAL)
18-
# define OIIO_ERRORHANDLER_PRINTF_DEPRECATED \
19-
OIIO_DEPRECATED( \
20-
"old style (printf-like) formatting version of this function is deprecated")
21-
#else
22-
# define OIIO_ERRORHANDLER_PRINTF_DEPRECATED
23-
#endif
24-
25-
2613
OIIO_NAMESPACE_BEGIN
2714

2815
/// ErrorHandler is a simple class that accepts error messages
@@ -94,117 +81,6 @@ class OIIO_UTIL_API ErrorHandler {
9481
void debug(const std::string&) {}
9582
#endif
9683

97-
// Formatted output with the same notation as Strutil::format.
98-
/// Use with caution! Some day this will change to be fmt-like rather
99-
/// than printf-like.
100-
template<typename... Args>
101-
OIIO_FORMAT_DEPRECATED void info(const char* format, const Args&... args)
102-
{
103-
if (verbosity() >= VERBOSE)
104-
info(Strutil::format(format, args...));
105-
}
106-
107-
/// Warning message with printf-like formatted error message.
108-
/// Will not print unless verbosity >= NORMAL (i.e. will suppress
109-
/// for QUIET).
110-
template<typename... Args>
111-
OIIO_FORMAT_DEPRECATED void warning(const char* format, const Args&... args)
112-
{
113-
if (verbosity() >= NORMAL)
114-
warning(Strutil::format(format, args...));
115-
}
116-
117-
/// Error message with printf-like formatted error message.
118-
/// Will print regardless of verbosity.
119-
template<typename... Args>
120-
OIIO_FORMAT_DEPRECATED void error(const char* format, const Args&... args)
121-
{
122-
error(Strutil::format(format, args...));
123-
}
124-
125-
/// Severe error message with printf-like formatted error message.
126-
/// Will print regardless of verbosity.
127-
template<typename... Args>
128-
OIIO_FORMAT_DEPRECATED void severe(const char* format, const Args&... args)
129-
{
130-
severe(Strutil::format(format, args...));
131-
}
132-
133-
/// Prefix-less message with printf-like formatted error message.
134-
/// Will not print if verbosity is QUIET. Also note that unlike
135-
/// the other routines, message() will NOT append a newline.
136-
template<typename... Args>
137-
OIIO_FORMAT_DEPRECATED void message(const char* format, const Args&... args)
138-
{
139-
if (verbosity() > QUIET)
140-
message(Strutil::format(format, args...));
141-
}
142-
143-
/// Debugging message with printf-like formatted error message.
144-
/// This will not produce any output if not in DEBUG mode, or
145-
/// if verbosity is QUIET.
146-
template<typename... Args>
147-
OIIO_FORMAT_DEPRECATED void debug(const char* format OIIO_MAYBE_UNUSED,
148-
const Args&... args OIIO_MAYBE_UNUSED)
149-
{
150-
#ifndef NDEBUG
151-
debug(Strutil::format(format, args...));
152-
#endif
153-
}
154-
155-
//
156-
// Formatted output with printf notation. Use these if you specifically
157-
// want printf-notation, even after format() changes to python notation
158-
// in some future OIIO release.
159-
//
160-
template<typename... Args>
161-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void infof(const char* format,
162-
const Args&... args)
163-
{
164-
if (verbosity() >= VERBOSE)
165-
info(Strutil::sprintf(format, args...));
166-
}
167-
168-
template<typename... Args>
169-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void warningf(const char* format,
170-
const Args&... args)
171-
{
172-
if (verbosity() >= NORMAL)
173-
warning(Strutil::sprintf(format, args...));
174-
}
175-
176-
template<typename... Args>
177-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void errorf(const char* format,
178-
const Args&... args)
179-
{
180-
error(Strutil::sprintf(format, args...));
181-
}
182-
183-
template<typename... Args>
184-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void severef(const char* format,
185-
const Args&... args)
186-
{
187-
severe(Strutil::sprintf(format, args...));
188-
}
189-
190-
template<typename... Args>
191-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void messagef(const char* format,
192-
const Args&... args)
193-
{
194-
if (verbosity() > QUIET)
195-
message(Strutil::sprintf(format, args...));
196-
}
197-
198-
template<typename... Args>
199-
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void
200-
debugf(const char* format OIIO_MAYBE_UNUSED,
201-
const Args&... args OIIO_MAYBE_UNUSED)
202-
{
203-
#ifndef NDEBUG
204-
debug(Strutil::sprintf(format, args...));
205-
#endif
206-
}
207-
20884
//
20985
// Formatted output with std::format notation. Use these if you
21086
// specifically want std::format-notation, even before format() changes

0 commit comments

Comments
 (0)