Skip to content

Commit cf2f54f

Browse files
committed
Avoid a branch in getindex(::ASCIIString,::Int)
Should fix #11768.
1 parent c6ceac2 commit cf2f54f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/ascii.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
## required core functionality ##
1111

1212
endof(s::ASCIIString) = length(s.data)
13-
getindex(s::ASCIIString, i::Int) = (x=s.data[i]; x < 0x80 ? Char(x) : '\ufffd')
13+
getindex(s::ASCIIString, i::Int) = (x=s.data[i]; ifelse(x < 0x80, Char(x), '\ufffd'))
1414

1515
## overload methods for efficiency ##
1616

0 commit comments

Comments
 (0)