]> git.mxchange.org Git - simgear.git/commitdiff
Fix sg_gzofstream path type (now SGPath)
authorJames Turner <zakalawe@mac.com>
Sun, 3 Jul 2016 22:05:42 +0000 (23:05 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
simgear/misc/sgstream.cxx
simgear/misc/sgstream.hxx

index 01e7ff12a91f38fdaee8d119da3044a429450e73..41289a632750776db8a01685dc7c758b7e727740 100644 (file)
@@ -162,7 +162,7 @@ sg_gzofstream::sg_gzofstream()
 //
 // Open a file for gzipped writing.
 //
-sg_gzofstream::sg_gzofstream( const std::string& name, ios_openmode io_mode )
+sg_gzofstream::sg_gzofstream( const SGPath& name, ios_openmode io_mode )
     : ostream(&gzbuf)
 {
     this->open( name, io_mode );
@@ -183,9 +183,10 @@ sg_gzofstream::sg_gzofstream( int fd, ios_openmode io_mode )
 // Open a file for gzipped writing.
 //
 void
-sg_gzofstream::open( const std::string& name, ios_openmode io_mode )
+sg_gzofstream::open( const SGPath& name, ios_openmode io_mode )
 {
-    gzbuf.open( name.c_str(), io_mode );
+    std::string ps = name.local8BitStr();
+    gzbuf.open( ps.c_str(), io_mode );
 }
 
 void
index f676b8a04e2d8c70918a1a5a3b574b2c605880e4..057c1d319cd911df80cdd767d148382db2ae602d 100644 (file)
@@ -133,7 +133,7 @@ public:
      * @param name name of file
      * @param io_mode file open mode(s) "or'd" together
      */
-    sg_gzofstream( const std::string& name,
+    sg_gzofstream( const SGPath& name,
            ios_openmode io_mode = ios_out | ios_binary );
 
     /**
@@ -148,7 +148,7 @@ public:
      * @param name name of file
      * @param io_mode file open mode(s) "or'd" together
      */
-    void open( const std::string& name,
+    void open( const SGPath& name,
            ios_openmode io_mode = ios_out|ios_binary );
 
     /**