lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master df58835 2/6: Never write files in "text" mode


From: Greg Chicares
Subject: [lmi-commits] [lmi] master df58835 2/6: Never write files in "text" mode: always use "binary" instead
Date: Mon, 5 Dec 2016 06:55:44 +0000 (UTC)

branch: master
commit df58835b4fba6f4d6f3febf899418b8791209c2b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Never write files in "text" mode: always use "binary" instead
    
    Otherwise, files written with msw can't be used with *nix.
---
 rate_table.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rate_table.cpp b/rate_table.cpp
index e123077..ab9b56b 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -229,7 +229,7 @@ void open_file(T& ifs, fs::path const& path, 
std::ios_base::openmode mode)
 template<typename T>
 inline void open_text_file(T& fs, fs::path const& path)
 {
-    open_file(fs, path, static_cast<std::ios_base::openmode>(0));
+    open_file(fs, path, std::ios_base::binary);
 }
 
 template<typename T>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]