Skip to content

Commit 43a3146

Browse files
committed
Constify av_cmp_q and av_inv_q
1 parent f433d84 commit 43a3146

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/avutil/rational.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::ffi::AVRational;
99
///
1010
/// @note The return value is not reduced.
1111
/// @see av_reduce()
12-
pub fn av_make_q(num: libc::c_int, den: libc::c_int) -> AVRational {
12+
pub const fn av_make_q(num: libc::c_int, den: libc::c_int) -> AVRational {
1313
AVRational { num, den }
1414
}
1515

@@ -48,7 +48,7 @@ pub fn av_q2d(a: AVRational) -> libc::c_double {
4848
/// Invert a rational.
4949
/// @param q value
5050
/// @return 1 / q
51-
pub fn av_inv_q(q: AVRational) -> AVRational {
51+
pub const fn av_inv_q(q: AVRational) -> AVRational {
5252
AVRational {
5353
num: q.den,
5454
den: q.num,

0 commit comments

Comments
 (0)