]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/UIUCModel/uiuc_1DdataFileReader.cpp
Merge branch 'next' of git://gitorious.org/fg/flightgear into next
[flightgear.git] / src / FDM / UIUCModel / uiuc_1DdataFileReader.cpp
index c8267a9d4c18450fc4d02f0caf9af2a975d84553..7b91c9a2e352302b7074d46e61f5a136377e37ea 100644 (file)
 ----------------------------------------------------------------------
 
  HISTORY:      02/15/2000   initial release
+               09/01/2002   (RD) added second data file reader for
+                            integer case
+               06/30/2003   (RD) replaced istrstream with istringstream
+                            to get rid of the annoying warning about
+                            using the strstream header
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Jeff Scott         <jscott@mail.com>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -62,8 +68,7 @@
 
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA or view http://www.gnu.org/copyleft/gpl.html.
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 **********************************************************************/
 
@@ -92,8 +97,8 @@ uiuc_1DdataFileReader( string file_name,
       linetoken1 = matrix -> getToken(*command_line, 1); // gettoken(string,tokenNo);
       linetoken2 = matrix -> getToken(*command_line, 2); // 2 represents token No 2
 
-      istrstream token1(linetoken1.c_str());
-      istrstream token2(linetoken2.c_str());
+      istringstream token1(linetoken1.c_str());
+      istringstream token2(linetoken2.c_str());
 
       token1 >> token_value1;
       token2 >> token_value2;
@@ -109,6 +114,7 @@ uiuc_1DdataFileReader( string file_name,
       //};
       data = 1;
     }
+  delete matrix;
   return data;
 }
 
@@ -136,8 +142,8 @@ uiuc_1DdataFileReader( string file_name,
       linetoken1 = matrix -> getToken(*command_line, 1); // gettoken(string,tokenNo);
       linetoken2 = matrix -> getToken(*command_line, 2); // 2 represents token No 2
 
-      istrstream token1(linetoken1.c_str());
-      istrstream token2(linetoken2.c_str());
+      istringstream token1(linetoken1.c_str());
+      istringstream token2(linetoken2.c_str());
 
       token1 >> token_value1;
       token2 >> token_value2;
@@ -148,6 +154,7 @@ uiuc_1DdataFileReader( string file_name,
       counter++;
       data = 1;
     }
+  delete matrix;
   return data;
 }