mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
Fixed save/loading of binary distortion model on Windows #128
This commit is contained in:
@@ -296,7 +296,7 @@ namespace clams
|
|||||||
{
|
{
|
||||||
bool ascii = UFile::getExtension(path).compare("txt") == 0;
|
bool ascii = UFile::getExtension(path).compare("txt") == 0;
|
||||||
ifstream f;
|
ifstream f;
|
||||||
f.open(path.c_str());
|
f.open(path.c_str(), ascii ? ios::in : ios::in | ios::binary);
|
||||||
if(!f.is_open()) {
|
if(!f.is_open()) {
|
||||||
cerr << "Failed to open " << path << endl;
|
cerr << "Failed to open " << path << endl;
|
||||||
assert(f.is_open());
|
assert(f.is_open());
|
||||||
@@ -309,7 +309,7 @@ namespace clams
|
|||||||
{
|
{
|
||||||
bool ascii = UFile::getExtension(path).compare("txt") == 0;
|
bool ascii = UFile::getExtension(path).compare("txt") == 0;
|
||||||
ofstream f;
|
ofstream f;
|
||||||
f.open(path.c_str());
|
f.open(path.c_str(), ascii?ios::out: ios::out | ios::binary);
|
||||||
if(!f.is_open()) {
|
if(!f.is_open()) {
|
||||||
cerr << "Failed to open " << path << endl;
|
cerr << "Failed to open " << path << endl;
|
||||||
assert(f.is_open());
|
assert(f.is_open());
|
||||||
|
|||||||
Reference in New Issue
Block a user