Skip to content

Commit

Permalink
Fix DBL_MAX deprecation warning (#403)
Browse files Browse the repository at this point in the history
* Fix DBL_MAX deprecation warning
  • Loading branch information
ayn authored and Khalian committed Apr 10, 2017
1 parent 25e9d61 commit d475a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/StringExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ extension String {
paragraphStyle.lineBreakMode = lineBreakMode!
attrib.updateValue(paragraphStyle, forKey: NSParagraphStyleAttributeName)
}
let size = CGSize(width: width, height: CGFloat(DBL_MAX))
let size = CGSize(width: width, height: CGFloat(Double.greatestFiniteMagnitude))
return ceil((self as NSString).boundingRect(with: size, options: NSStringDrawingOptions.usesLineFragmentOrigin, attributes:attrib, context: nil).height)
}

Expand Down

0 comments on commit d475a43

Please sign in to comment.