I have the following C macro from libpurple:
#define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
How can i write that as a function that will get as a parameter a QByteArray and retrun a quint16 value using the algorithm in the c macro above?
I've asked a similar question that will convert from quint16 to QByteArray here so basically what i am trying to do now is the reverse of that function.
Thanks.