Skip to content
Snippets Groups Projects
Commit fd34ebda authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

XDR: Add float and double support

parent d5636b93
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,8 @@ class XDRInput {
int32_t get_int32();
uint64_t get_uint64();
int64_t get_int64();
float get_float();
double get_double();
uint32_t get_opaque_length();
char* get_opaque(uint32_t length);
};
......
......@@ -35,6 +35,18 @@ int64_t XDRInput::get_int64()
return (ret0 << 32) | ret1;
}
float XDRInput::get_float()
{
uint32_t val = get_uint32();
return *(float*)&val;
}
double XDRInput::get_double()
{
uint64_t val = get_uint64();
return *(double*)&val;
}
uint32_t XDRInput::get_opaque_length()
{
return get_uint32();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment