| Thread Previous • Date Previous • Date Next • Thread Next |
------------------------------------------------------------ revno: 3588 committer: Anton Gladky <gladky.anton@xxxxxxxxx> timestamp: Mon 2015-02-16 23:50:18 +0100 message: Fix compilation with GCC-5. (Closes: #778190) modified: lib/base/Math.hpp pkg/dem/Disp2DPropLoadEngine.cpp pkg/dem/MicroMacroAnalyser.cpp -- lp:yade https://code.launchpad.net/~yade-pkg/yade/git-trunk Your team Yade developers is subscribed to branch lp:yade. To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/base/Math.hpp'
--- lib/base/Math.hpp 2014-07-14 20:08:34 +0000
+++ lib/base/Math.hpp 2015-02-16 22:50:18 +0000
@@ -65,6 +65,7 @@
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/numeric/conversion/bounds.hpp>
=== modified file 'pkg/dem/Disp2DPropLoadEngine.cpp'
--- pkg/dem/Disp2DPropLoadEngine.cpp 2014-10-15 06:44:01 +0000
+++ pkg/dem/Disp2DPropLoadEngine.cpp 2015-02-16 22:50:18 +0000
@@ -19,9 +19,8 @@
void Disp2DPropLoadEngine::postLoad(Disp2DPropLoadEngine&)
{
std::string outputFile="DirSearch" + Key + "Yade";
- bool file_exists = std::ifstream (outputFile.c_str()); //if file does not exist, we will write colums titles
ofile.open(outputFile.c_str(), std::ios::app);
- if (!file_exists) ofile<<"theta (!angle in plane (gamma,-du) ) dtau (kPa) dsigma (kPa) dgamma (m) du (m) tau0 (kPa) sigma0 (kPa) d2W coordSs0 coordTot0 coordSsF coordTotF (Yade)" << endl;
+ if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"theta (!angle in plane (gamma,-du) ) dtau (kPa) dsigma (kPa) dgamma (m) du (m) tau0 (kPa) sigma0 (kPa) d2W coordSs0 coordTot0 coordSsF coordTotF (Yade)" << endl;
}
=== modified file 'pkg/dem/MicroMacroAnalyser.cpp'
--- pkg/dem/MicroMacroAnalyser.cpp 2014-10-15 06:44:01 +0000
+++ pkg/dem/MicroMacroAnalyser.cpp 2015-02-16 22:50:18 +0000
@@ -29,9 +29,8 @@
void MicroMacroAnalyser::postLoad(MicroMacroAnalyser&)
{
- bool file_exists = std::ifstream(outputFile.c_str()); //if file does not exist, we will write colums titles
ofile.open(outputFile.c_str(), std::ios::app);
- if (!file_exists) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
+ if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
}
void MicroMacroAnalyser::action()
@@ -51,9 +50,8 @@
if (!initialized) {
setState(1,true,false);
//Check file here again, to make sure we write to the correct file when filename is modified after the scene is loaded
- bool file_exists = std::ifstream(outputFile.c_str());
ofile.open(outputFile.c_str(), std::ios::app);
- if (!file_exists) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
+ if (!boost::filesystem::exists( outputFile.c_str() )) ofile<<"iteration eps1w eps2w eps3w eps11g eps22g eps33g eps12g eps13g eps23g"<< endl;
initialized=true;
} else if (scene->iter % interval == 0) {
setState(2, true, compIncrt);
| Thread Previous • Date Previous • Date Next • Thread Next |