Skip to content

Commit

Permalink
Changes Some to Option to account for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
hobnob committed Nov 7, 2024
1 parent 8c57ffe commit 0a6665e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ final case class ScreenCaptureConfig(
* @return
*/
def withName(name: String): ScreenCaptureConfig =
this.copy(name = Some(name))
this.copy(name = Option(name))

/** Set the cropping rectangle of the capture
*
* @param rect
* @return
*/
def withCrop(rect: Rectangle): ScreenCaptureConfig =
this.copy(croppingRect = Some(rect))
this.copy(croppingRect = Option(rect))

/** Set the scale of the capture
*
Expand All @@ -57,7 +57,7 @@ final case class ScreenCaptureConfig(
* @return
*/
def withScale(scale: Vector2): ScreenCaptureConfig =
this.copy(scale = Some(scale))
this.copy(scale = Option(scale))

/** Set the image type of the capture
*
Expand Down

0 comments on commit 0a6665e

Please sign in to comment.