]> git.mxchange.org Git - simgear.git/commitdiff
Use SGBinaryFile in a couple more places.
authorJames Turner <zakalawe@mac.com>
Sat, 7 May 2016 09:03:48 +0000 (10:03 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
Most importantly, when computing a hash from the on-disk
state.

simgear/io/HTTPRepository.cxx
simgear/io/test_repository.cxx
simgear/package/CatalogTest.cxx

index 09f2f8e5a2a1ac1de903565a0a09a2a3b3d14b6a..f2dcc943d7e17b69f6d0f675595f623e0b921de8 100644 (file)
@@ -843,7 +843,7 @@ HTTPRepository::failure() const
         sha1_init(&info);
         char* buf = static_cast<char*>(malloc(1024 * 1024));
         size_t readLen;
-        SGFile f(p.str());
+        SGBinaryFile f(p.str());
         if (!f.open(SG_IO_IN)) {
             throw sg_io_exception("Couldn't open file for compute hash", p);
         }
index 6ea61c10f98114818619a5883f1ebf9da3d389f1..760223d0db094254e7210ce7b7017064987ec33f 100644 (file)
@@ -286,7 +286,7 @@ std::string test_computeHashForPath(const SGPath& p)
     char* buf = static_cast<char*>(alloca(1024 * 1024));
     size_t readLen;
 
-    SGFile f(p.str());
+    SGBinaryFile f(p.str());
     f.open(SG_IO_IN);
 
     while ((readLen = f.read(buf, 1024 * 1024)) > 0) {
index 216e4522f644682492f8cfdde639fd095155986a..22a4cd544ea3a718466676a67aba0239d502b5a4 100644 (file)
@@ -46,7 +46,7 @@ std::string readFileIntoString(const SGPath& path)
     std::string contents;
 
     size_t readLen;
-    SGFile f(path.str());
+    SGBinaryFile f(path.str());
     if (!f.open(SG_IO_IN)) {
         throw sg_io_exception("Couldn't open file", path);
     }