Skip to content

Commit 51020ab

Browse files
authored
docs: Online docs improvements, mostly formatting (AcademySoftwareFoundation#4736)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 569c118 commit 51020ab

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

src/doc/Doxyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2197,12 +2197,13 @@ PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \
21972197
OIIO_CONST_FUNC= \
21982198
OIIO_MAYBE_UNUSED= \
21992199
OIIO_NODISCARD:= \
2200-
OIIO_DEPRECATED:=[[deprecated]] \
2200+
OIIO_DEPRECATED(x)=[[deprecated]] \
22012201
OIIO_FORMAT_DEPRECATED:= \
22022202
OIIO_FORCEINLINE=inline \
22032203
IMATH_HALF_H_=1 \
22042204
INCLUDED_IMATHVEC_H=1 \
22052205
INCLUDED_IMATHMATRIX_H=1 \
2206+
OIIO_ENABLE_IF(x)="std::enable_if_t<(x), int> = 0" \
22062207

22072208

22082209
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this

src/doc/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sphinx >= 5.0
2-
breathe == 4.34.0
1+
sphinx >= 8.0
2+
breathe == 4.36.0
33
sphinx-tabs
44
furo==2022.6.21

src/doc/texturesys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ structure:
178178

179179
- `int colortransformid` :
180180
If non-zero, specifies a color transformation to apply to the texels, a
181-
handle to a transform retrerieved `TextureSystem::get_colortransform_id()`.
181+
handle to a transform retrieved `TextureSystem::get_colortransform_id()`.
182182

183183

184184

src/include/OpenImageIO/image_span.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ template<typename T, size_t Rank = 4> class image_span {
9898
// clang-format off
9999
/* clang_format gets confused by this */
100100

101-
/// Copy constructor from image_span<T> to image_span<const T>.
101+
/// Copy constructor from `image_span<T>` to `image_span<const T>`.
102102
template<typename U, size_t R,
103103
OIIO_ENABLE_IF((std::is_same_v<std::remove_const_t<T>, U>)
104104
&& std::is_const_v<T> && !std::is_const_v<U>
@@ -112,7 +112,7 @@ template<typename T, size_t Rank = 4> class image_span {
112112
}
113113
// clang-format on
114114

115-
/// Construct from span<T> and dimensions, assume contiguous strides.
115+
/// Construct from `span<T>` and dimensions, assume contiguous strides.
116116
image_span(span<T> data, uint32_t nchannels, uint32_t width,
117117
uint32_t height, uint32_t depth = 1)
118118
: image_span(data.data(), nchannels, width, height, depth)
@@ -126,7 +126,7 @@ template<typename T, size_t Rank = 4> class image_span {
126126
/// same strided data as the operand.
127127
image_span& operator=(const image_span& copy) = default;
128128

129-
/// image_span(x,y,z) returns a strided_ptr<T,1> for the pixel (x,y,z).
129+
/// image_span(x,y,z) returns a `strided_ptr<T,1>` for the pixel (x,y,z).
130130
/// The z can be omitted for 2D images. Note that the resulting
131131
/// strided_ptr can then have individual channels accessed with
132132
/// operator[]. This particular strided pointer has stride multiplier 1,
@@ -212,8 +212,8 @@ template<typename T, size_t Rank = 4> class image_span {
212212
ystride(), zstride(), m_chansize);
213213
}
214214

215-
/// Convert an image_span<T> to an image_span<std::byte> representing the
216-
/// same sized and strided memory pattern represented un-typed memory.
215+
/// Convert an `image_span<T>` to an image_span<std::byte> representing
216+
/// the same sized and strided memory pattern represented un-typed memory.
217217
/// Note that this will not work (be a compiler error) if T a const type.
218218
image_span<std::byte> as_writable_bytes_image_span() const noexcept
219219
{

src/include/OpenImageIO/span.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ class span {
9595
/// Copy constructor (copies the span pointer and length, NOT the data).
9696
constexpr span (const span &copy) noexcept = default;
9797

98+
#ifndef OIIO_DOXYGEN /* this declaration confuses doxygen */
9899
/// Copy constructor from a different extent (copies the span pointer and
99100
/// length, NOT the data). This allows for construction of `span<const T>`
100101
/// from `span<T>`, and for converting fixed extent to dynamic extent.
@@ -104,6 +105,7 @@ class span {
104105
&& (extent == dynamic_extent || extent == N))>
105106
constexpr span (const span<U,N> &copy) noexcept
106107
: m_data(copy.data()), m_size(copy.size()) { }
108+
#endif
107109

108110
/// Construct from T* and length.
109111
constexpr span (pointer data, size_type size) noexcept

0 commit comments

Comments
 (0)