Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
1f22bcba
Commit
1f22bcba
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: change read-save filename type for string
parent
496c6846
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
+6
-6
6 additions, 6 deletions
Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
Code/Fuzzy/otbFuzzyDescriptorsModelManager.h
+2
-2
2 additions, 2 deletions
Code/Fuzzy/otbFuzzyDescriptorsModelManager.h
with
8 additions
and
8 deletions
Code/Fuzzy/otbFuzzyDescriptorsModelManager.cxx
+
6
−
6
View file @
1f22bcba
...
...
@@ -91,10 +91,10 @@ FuzzyDescriptorsModelManager
FuzzyDescriptorsModelManager
::
DescriptorsModelType
FuzzyDescriptorsModelManager
::
Read
(
const
char
*
filename
)
::
Read
(
const
std
::
string
&
filename
)
{
// Check if the filename is not empty
if
(
filename
==
NULL
)
if
(
filename
.
empty
()
==
true
)
{
itkGenericExceptionMacro
(
<<
"The XML output FileName is empty"
);
}
...
...
@@ -107,7 +107,7 @@ FuzzyDescriptorsModelManager
}
// Open the xml file
TiXmlDocument
doc
(
filename
);
TiXmlDocument
doc
(
filename
.
c_str
()
);
if
(
!
doc
.
LoadFile
())
{
itkGenericExceptionMacro
(
<<
"Can't open file "
<<
filename
);
...
...
@@ -157,10 +157,10 @@ FuzzyDescriptorsModelManager
void
FuzzyDescriptorsModelManager
::
Save
(
const
char
*
filename
,
DescriptorsModelType
&
model
)
::
Save
(
const
std
::
string
&
filename
,
DescriptorsModelType
&
model
)
{
// Check if the filename is not empty
if
(
filename
==
NULL
)
if
(
filename
.
empty
()
==
true
)
{
itkGenericExceptionMacro
(
<<
"The XML output FileName is empty"
);
}
...
...
@@ -201,7 +201,7 @@ FuzzyDescriptorsModelManager
}
// Finally, write the file
doc
.
SaveFile
(
filename
);
doc
.
SaveFile
(
filename
.
c_str
()
);
}
...
...
This diff is collapsed.
Click to expand it.
Code/Fuzzy/otbFuzzyDescriptorsModelManager.h
+
2
−
2
View file @
1f22bcba
...
...
@@ -53,9 +53,9 @@ public:
/** Print a model */
static
void
Print
(
const
DescriptorsModelType
&
descModel
);
/** Read a model from a xml file */
static
DescriptorsModelType
Read
(
const
char
*
filename
);
static
DescriptorsModelType
Read
(
const
std
::
string
&
filename
);
/** Write a model in a xml file */
static
void
Save
(
const
char
*
filename
,
DescriptorsModelType
&
model
);
static
void
Save
(
const
std
::
string
&
filename
,
DescriptorsModelType
&
model
);
FuzzyDescriptorsModelManager
();
virtual
~
FuzzyDescriptorsModelManager
()
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment