From cf2f54feaf3b3804a40be69749d60403c0b9feff Mon Sep 17 00:00:00 2001 From: Oscar Blumberg Date: Sat, 20 Jun 2015 17:48:28 -0400 Subject: [PATCH] Avoid a branch in `getindex(::ASCIIString,::Int)` Should fix #11768. --- base/ascii.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/ascii.jl b/base/ascii.jl index 8e61d745b259f..211e37cae9b84 100644 --- a/base/ascii.jl +++ b/base/ascii.jl @@ -10,7 +10,7 @@ ## required core functionality ## endof(s::ASCIIString) = length(s.data) -getindex(s::ASCIIString, i::Int) = (x=s.data[i]; x < 0x80 ? Char(x) : '\ufffd') +getindex(s::ASCIIString, i::Int) = (x=s.data[i]; ifelse(x < 0x80, Char(x), '\ufffd')) ## overload methods for efficiency ##