only set precision for writers that write ascii

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@749 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Isaak Lim
2012-10-15 14:46:52 +00:00
parent 1707f09f0d
commit 176dab0a80
4 changed files with 22 additions and 31 deletions

View File

@@ -115,7 +115,8 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream
return false;
}
out.precision(_precision);
if (!_opt.check(Options::Binary))
out.precision(_precision);
// write to file
bool result = (_opt.check(Options::Binary) ?
@@ -153,7 +154,8 @@ write(std::ostream& _os, BaseExporter& _be, Options _opt, std::streamsize _preci
return false;
}
_os.precision(_precision);
if (!_opt.check(Options::Binary))
_os.precision(_precision);
// write to file
bool result = (_opt.check(Options::Binary) ?