cpu_ref: fix c++11 narrowing violations

the best fix for these is to use static casting

Change-Id: I00344826a33e5387638ae5edf4c6b85c92f43769
2 files changed