Date: Monday, January 15, 2007 @ 12:12:32
Author: marc
Path: /cvsroot/carob/carob/src
Modified: SQLDataSerialization.cpp (1.37 -> 1.38)
Minor re-ordering
--------------------------+
SQLDataSerialization.cpp | 50 ++++++++++++++++++++++-----------------------
1 files changed, 25 insertions(+), 25 deletions(-)
Index: carob/src/SQLDataSerialization.cpp
diff -u carob/src/SQLDataSerialization.cpp:1.37
carob/src/SQLDataSerialization.cpp:1.38
--- carob/src/SQLDataSerialization.cpp:1.37 Mon Dec 18 18:36:49 2006
+++ carob/src/SQLDataSerialization.cpp Mon Jan 15 12:12:32 2007
@@ -142,31 +142,6 @@
return res;
}
-/**
- * Converts the input integer which is in in IEEE 754 floating-point
- * "single format" bit layout to the corresponding float.
- * Bit 31 (the most significant) is the sign bit,
- * bits 30-23 (masked by 0x7f800000) represent the exponent,
- * and bits 22-0 (masked by 0x007fffff) are the mantissa.
- * This function leaves NaN alone.
- */
-ResultSetDataType floatDeserializer(const DriverSocket& input)
- throw (SocketIOException, UnexpectedException)
-{
- ResultSetDataType res;
- int32_t intRead;
-
- input >> intRead; // this does call ntohl()
-
- if (floats_inverted_endianness)
- // obviously cannot use ntohl() to swap unconditionnally!
- throw NotImplementedException(L"Inverted endianness Not Implemented
Yet");
- else
- res.as_float = U32BitsToFloat(intRead); // sign casting here
-
- return res;
-}
-
// Double
/**
* Relatively safe "reinterpret_cast" of an IEEE 754 double to its
@@ -209,6 +184,31 @@
}
/**
+ * Converts the input integer which is in in IEEE 754 floating-point
+ * "single format" bit layout to the corresponding float.
+ * Bit 31 (the most significant) is the sign bit,
+ * bits 30-23 (masked by 0x7f800000) represent the exponent,
+ * and bits 22-0 (masked by 0x007fffff) are the mantissa.
+ * This function leaves NaN alone.
+ */
+ResultSetDataType floatDeserializer(const DriverSocket& input)
+ throw (SocketIOException, UnexpectedException)
+{
+ ResultSetDataType res;
+ int32_t intRead;
+
+ input >> intRead; // this does call ntohl()
+
+ if (floats_inverted_endianness)
+ // obviously cannot use ntohl() to swap unconditionnally!
+ throw NotImplementedException(L"Inverted endianness Not Implemented
Yet");
+ else
+ res.as_float = U32BitsToFloat(intRead); // sign casting here
+
+ return res;
+}
+
+/**
* Converts the argument in IEEE 754 floating-point "double format" bit layout
* to the corresponding float. Bit 63 (the most significant) is the sign bit,
* bits 62-52 (masked by 0x7ff0000000000000L) represent the exponent,
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits