Uniform asymptotics for orthogonal polynomials via the Riemann--Hilbert approach