Date: Monday, December 19, 2005 @ 19:34:26
  Author: zsolt
    Path: /cvsroot/carob/carob

Modified: include/BigDecimal.hpp (1.9 -> 1.10) src/BigDecimal.cpp (1.11 ->
          1.12)

Modified the wstring() operator to be constant


------------------------+
 include/BigDecimal.hpp |   10 +++++-----
 src/BigDecimal.cpp     |   12 +++++++-----
 2 files changed, 12 insertions(+), 10 deletions(-)


Index: carob/include/BigDecimal.hpp
diff -u carob/include/BigDecimal.hpp:1.9 carob/include/BigDecimal.hpp:1.10
--- carob/include/BigDecimal.hpp:1.9    Tue Dec 13 16:08:30 2005
+++ carob/include/BigDecimal.hpp        Mon Dec 19 19:34:26 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  *
  * Initial developer(s): Gilles Rayrat
- * Contributor(s): 
+ * Contributor(s): Zsolt Simon
  */
 
 #ifndef BIGDECIMAL_H_
@@ -66,7 +66,7 @@
    * Convertion to string. Handy for displaying the number
    * FIXME: This is dummy code for now (testing state), correct it
    */ 
-  operator std::wstring();
+  operator std::wstring() const;
 private:
     
   /** Length of the unscaled value java_byte-array */
@@ -88,7 +88,7 @@
    * @param intArrayLength (out) size of the generated int array
    * @return converted int array
    */
-  int*          toIntArray(int& intArrayLength);
+  int*          toIntArray(int& intArrayLength) const;
 
   /**
    * Returns a copy of the member java_byte array stripped of any leading zero
@@ -96,7 +96,7 @@
    * @param intArrayLength (out) size of the generated int array
    * @return stripped java_byte array as an int array 
    */
-  int*          stripByteArrayLeadingZeroBytes(int& intArrayLength);
+  int*          stripByteArrayLeadingZeroBytes(int& intArrayLength) const;
   /**
    * From the member array representing a negative 2's-complement number,
    * returns the minimal (no leading zero bytes) unsigned whose value is -a 
into
@@ -104,7 +104,7 @@
    * @param intArrayLength (out) size of the generated int array
    * @return positive int array corresponding to the java_byte array
    */
-  int*          makeByteArrayPositive(int& intArrayLength);
+  int*          makeByteArrayPositive(int& intArrayLength) const;
 
 
 };
Index: carob/src/BigDecimal.cpp
diff -u carob/src/BigDecimal.cpp:1.11 carob/src/BigDecimal.cpp:1.12
--- carob/src/BigDecimal.cpp:1.11       Tue Dec 13 16:08:30 2005
+++ carob/src/BigDecimal.cpp    Mon Dec 19 19:34:26 2005
@@ -16,7 +16,7 @@
  * limitations under the License.
  *
  * Initial developer(s): Gilles Rayrat
- * Contributor(s): 
+ * Contributor(s): Zsolt Simon
  */
 
 #include "BigDecimal.hpp"
@@ -102,7 +102,7 @@
   return res;
 }
 
-int* BigDecimal::toIntArray(int& intArrayLength)
+int* BigDecimal::toIntArray(int& intArrayLength) const
 {
   if (byteArrayLength == 0)
       return NULL;
@@ -122,7 +122,7 @@
   return intArray;
 }
 
-int* BigDecimal::stripByteArrayLeadingZeroBytes(int& intArrayLength)
+int* BigDecimal::stripByteArrayLeadingZeroBytes(int& intArrayLength) const
 {
   unsigned int keep;
   // Find first nonzero byte
@@ -143,7 +143,7 @@
   return result;
 }
 
-int* BigDecimal::makeByteArrayPositive(int& intArrayLength)
+int* BigDecimal::makeByteArrayPositive(int& intArrayLength) const
 {
   unsigned int keep, k;
 
@@ -187,7 +187,7 @@
   return result;
 }
 
-BigDecimal::operator wstring()
+BigDecimal::operator wstring() const
 {
   // !!!!!!!    THAT IS JUST A DUMMY FUNCTION FOR TESTING    !!!!!!
 /*  wstring sRet;
@@ -235,6 +235,8 @@
     sRet.insert(sRet.length()-scale,L".");
   }
 
+       delete []test;
+       
   return sRet;
 
 /*  wstring sRet;

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to