diff liboctave/Sparse.cc @ 5765:7ba9ad1fec11

[project @ 2006-04-17 05:05:15 by jwe]
author jwe
date Mon, 17 Apr 2006 05:05:17 +0000
parents 8d7162924bd3
children f3be83cff153
line wrap: on
line diff
--- a/liboctave/Sparse.cc	Sun Apr 16 19:10:01 2006 +0000
+++ b/liboctave/Sparse.cc	Mon Apr 17 05:05:17 2006 +0000
@@ -29,6 +29,7 @@
 #include <climits>
 
 #include <iostream>
+#include <sstream>
 #include <vector>
 
 #include "Array.h"
@@ -37,7 +38,6 @@
 #include "Range.h"
 #include "idx-vector.h"
 #include "lo-error.h"
-#include "lo-sstream.h"
 #include "quit.h"
 
 #include "Sparse.h"
@@ -679,7 +679,7 @@
 T
 Sparse<T>::range_error (const char *fcn, const Array<octave_idx_type>& ra_idx) const
 {
-  OSSTREAM buf;
+  std::ostringstream buf;
 
   buf << fcn << " (";
 
@@ -692,12 +692,10 @@
     buf << ", " << ra_idx(i);
 
   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 ();
 }
@@ -706,7 +704,7 @@
 T&
 Sparse<T>::range_error (const char *fcn, const Array<octave_idx_type>& ra_idx)
 {
-  OSSTREAM buf;
+  std::ostringstream buf;
 
   buf << fcn << " (";
 
@@ -720,11 +718,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;