getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] (no subject)


From: Tetsuo Koyama
Subject: [Getfem-commits] (no subject)
Date: Sun, 18 Nov 2018 03:21:46 -0500 (EST)

branch: devel-tetsuo-fix_vecsave_option
commit 5b0ebffcb215921dd42c10f990294d34b56d1af2
Author: Tetsuo Koyama <address@hidden>
Date:   Sun Nov 18 17:17:56 2018 +0900

    Fix vecsave format option
    
    delete boost/format.hpp
---
 src/gmm/gmm_inoutput.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gmm/gmm_inoutput.h b/src/gmm/gmm_inoutput.h
index 9c22e7a..21d857d 100644
--- a/src/gmm/gmm_inoutput.h
+++ b/src/gmm/gmm_inoutput.h
@@ -41,7 +41,6 @@
 #define GMM_INOUTPUT_H
 
 #include <stdio.h>
-#include <boost/format.hpp>
 #include "gmm_kernel.h"
 namespace gmm {
 
@@ -1153,13 +1152,14 @@ namespace gmm {
         f.write(reinterpret_cast<const char*>(&V[i]), sizeof(V[i]));
     }
     else {
-      std::ofstream f(fname.c_str()); f.imbue(std::locale("C"));
       if (Vformat.empty()){
+        std::ofstream f(fname.c_str()); f.imbue(std::locale("C"));
         f.precision(16);
         for (size_type i=0; i < gmm::vect_size(V); ++i) f << V[i] << "\n";
       }
       else {
-        for (size_type i=0; i < gmm::vect_size(V); ++i) f << 
boost::format(Vformat) % V[i];
+        FILE* f = fopen(fname.c_str(), "w");
+        for (size_type i=0; i < gmm::vect_size(V); ++i) fprintf(f, 
Vformat.c_str(), V[i]);
       }
     }
   } 



reply via email to

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