Missing one const in the function cast.