Take a function that does not need to be a member and make it static inline. Also replace the return value of -1 by a #define'd constant. Change-Id: I92e0deaa1df65998b76aba6329a4c8eb4d287485