cpu_ref: fix c++11 narrowing violations

the best fix for these is to use static casting