diff liboctave/Array.cc @ 5765:7ba9ad1fec11

[project @ 2006-04-17 05:05:15 by jwe]
author jwe
date Mon, 17 Apr 2006 05:05:17 +0000
parents 6e9a14b3c299
children ace8d8d26933
line wrap: on
line diff
--- a/liboctave/Array.cc	Sun Apr 16 19:10:01 2006 +0000
+++ b/liboctave/Array.cc	Mon Apr 17 05:05:17 2006 +0000
@@ -30,6 +30,7 @@
 #include <climits>
 
 #include <iostream>
+#include <sstream>
 #include <vector>
 
 #include "Array.h"
@@ -38,7 +39,6 @@
 #include "Range.h"
 #include "idx-vector.h"
 #include "lo-error.h"
-#include "lo-sstream.h"
 
 // One dimensional array class.  Handles the reference counting for
 // all the derived classes.
@@ -354,7 +354,7 @@
 T
 Array<T>::range_error (const char *fcn, const Array<int>& ra_idx) const
 {
-  OSSTREAM buf;
+  std::ostringstream buf;
 
   buf << fcn << " (";
 
@@ -368,11 +368,9 @@
 
   buf << "): range error";
 
-  buf << OSSTREAM_ENDS;
-
-  (*current_liboctave_error_handler) (OSSTREAM_C_STR (buf));
-
-  OSSTREAM_FREEZE (buf);
+  std::string buf_str = buf.str ();
+
+  (*current_liboctave_error_handler) (buf_str.c_str ());
 
   return T ();
 }
@@ -381,7 +379,7 @@
 T&
 Array<T>::range_error (const char *fcn, const Array<int>& ra_idx)
 {
-  OSSTREAM buf;
+  std::ostringstream buf;
 
   buf << fcn << " (";
 
@@ -395,11 +393,9 @@
 
   buf << "): range error";
 
-  buf << OSSTREAM_ENDS;
-
-  (*current_liboctave_error_handler) (OSSTREAM_C_STR (buf));
-
-  OSSTREAM_FREEZE (buf);
+  std::string buf_str = buf.str ();
+
+  (*current_liboctave_error_handler) (buf_str.c_str ());
 
   static T foo;
   return foo;