From: James Turner <zakalawe@mac.com>
Date: Sat, 7 May 2016 09:03:48 +0000 (+0100)
Subject: Use SGBinaryFile in a couple more places.
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=050c24c85bdf0bf9694e5004400a375092c4e44f;p=simgear.git

Use SGBinaryFile in a couple more places.

Most importantly, when computing a hash from the on-disk
state.
---

diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx
index 09f2f8e5..f2dcc943 100644
--- a/simgear/io/HTTPRepository.cxx
+++ b/simgear/io/HTTPRepository.cxx
@@ -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);
         }
diff --git a/simgear/io/test_repository.cxx b/simgear/io/test_repository.cxx
index 6ea61c10..760223d0 100644
--- a/simgear/io/test_repository.cxx
+++ b/simgear/io/test_repository.cxx
@@ -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) {
diff --git a/simgear/package/CatalogTest.cxx b/simgear/package/CatalogTest.cxx
index 216e4522..22a4cd54 100644
--- a/simgear/package/CatalogTest.cxx
+++ b/simgear/package/CatalogTest.cxx
@@ -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);
     }