Skip to content

Commit

Permalink
const for applicable image methods
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrgani committed Jun 27, 2024
1 parent 3f75df8 commit 5dbfc99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Image {
/// # use macroquad::prelude::*;
/// let image = Image::empty();
/// ```
pub fn empty() -> Image {
pub const fn empty() -> Image {
Image {
width: 0,
height: 0,
Expand Down Expand Up @@ -174,12 +174,12 @@ impl Image {
}

/// Returns the width of this image.
pub fn width(&self) -> u16 {
pub const fn width(&self) -> u16 {
self.width
}

/// Returns the height of this image.
pub fn height(&self) -> u16 {
pub const fn height(&self) -> u16 {
self.height
}

Expand Down

0 comments on commit 5dbfc99

Please sign in to comment.