mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: get_float convenience helper
more helpers like that can be added as needed
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
Macro for reading 32-bit integer from network byte order (big-endian)
|
||||
@@ -51,4 +52,12 @@
|
||||
#include "little_endian.h"
|
||||
#endif
|
||||
|
||||
/* convenienve helpers */
|
||||
static inline float get_float(const void *from)
|
||||
{
|
||||
float to;
|
||||
float4get(to, ((const uchar*)from));
|
||||
return to;
|
||||
}
|
||||
|
||||
#endif /* MY_BYTEORDER_INCLUDED */
|
||||
|
Reference in New Issue
Block a user