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
3815c590
Commit
3815c590
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: correct return not logical value
parent
9a717519
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx
+1
-1
1 addition, 1 deletion
...rappers/CommandLine/otbApplicationLauncherCommandLine.cxx
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+27
-27
27 additions, 27 deletions
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
with
28 additions
and
28 deletions
Code/Wrappers/CommandLine/otbApplicationLauncherCommandLine.cxx
+
1
−
1
View file @
3815c590
...
...
@@ -44,7 +44,7 @@ int main(int argc, char* argv[])
typedef
otb
::
Wrapper
::
CommandLineLauncher
LauncherType
;
LauncherType
::
Pointer
launcher
=
LauncherType
::
New
();
if
(
launcher
->
Load
(
exp
)
==
tru
e
)
if
(
launcher
->
Load
(
exp
)
==
fals
e
)
{
if
(
launcher
->
ExecuteAndWriteOutput
()
==
true
)
{
...
...
This diff is collapsed.
Click to expand it.
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+
27
−
27
View file @
3815c590
...
...
@@ -107,19 +107,19 @@ CommandLineLauncher::Load()
itkExceptionMacro
(
"No expression specified..."
);
}
if
(
this
->
CheckParametersPrefix
()
==
fals
e
)
if
(
this
->
CheckParametersPrefix
()
==
tru
e
)
{
std
::
cerr
<<
"ERROR: Parameter keys have to set using
\"
--
\"
"
<<
std
::
endl
;
return
fals
e
;
return
tru
e
;
}
if
(
this
->
CheckUnicity
()
==
fals
e
)
if
(
this
->
CheckUnicity
()
==
tru
e
)
{
std
::
cerr
<<
"ERROR: At least one key is not unique in the expression..."
<<
std
::
endl
;
return
fals
e
;
return
tru
e
;
}
if
(
this
->
LoadPath
()
==
fals
e
)
if
(
this
->
LoadPath
()
==
tru
e
)
{
if
(
m_Parser
->
GetPathsAsString
(
m_Expression
).
size
()
!=
0
)
{
...
...
@@ -131,18 +131,18 @@ CommandLineLauncher::Load()
{
std
::
cerr
<<
"ERROR: Trouble loading path, please check your command line..."
<<
std
::
endl
;
}
return
fals
e
;
return
tru
e
;
}
this
->
LoadApplication
();
return
tru
e
;
return
fals
e
;
}
bool
CommandLineLauncher
::
Execute
()
{
if
(
this
->
BeforeExecute
()
==
fals
e
)
if
(
this
->
BeforeExecute
()
==
tru
e
)
{
return
true
;
}
...
...
@@ -157,7 +157,7 @@ CommandLineLauncher::Execute()
bool
CommandLineLauncher
::
ExecuteAndWriteOutput
()
{
if
(
this
->
BeforeExecute
()
==
fals
e
)
if
(
this
->
BeforeExecute
()
==
tru
e
)
{
return
true
;
}
...
...
@@ -176,22 +176,22 @@ CommandLineLauncher::BeforeExecute()
if
(
m_Application
.
IsNull
()
)
{
std
::
cerr
<<
"ERROR: No loaded application..."
<<
std
::
endl
;
return
fals
e
;
return
tru
e
;
}
// if help is asked...
if
(
m_Parser
->
IsAttributExists
(
"--help"
,
m_Expression
)
==
true
)
{
this
->
DisplayHelp
();
return
fals
e
;
return
tru
e
;
}
// Check the key validity (ie. exist in the application parameters)
if
(
this
->
CheckKeyValidity
()
==
fals
e
)
if
(
this
->
CheckKeyValidity
()
==
tru
e
)
{
std
::
cerr
<<
"ERROR: At least one key is not known by the application..."
<<
std
::
endl
;
this
->
DisplayHelp
();
return
fals
e
;
return
tru
e
;
}
try
...
...
@@ -203,7 +203,7 @@ CommandLineLauncher::BeforeExecute()
this
->
LoadApplication
();
this
->
DisplayHelp
();
return
fals
e
;
return
tru
e
;
}
}
catch
(
itk
::
ExceptionObject
&
err
)
...
...
@@ -214,7 +214,7 @@ CommandLineLauncher::BeforeExecute()
this
->
LoadApplication
();
this
->
DisplayHelp
();
return
fals
e
;
return
tru
e
;
}
m_Application
->
UpdateParameters
();
...
...
@@ -227,7 +227,7 @@ CommandLineLauncher::BeforeExecute()
if
(
val
.
size
()
!=
1
)
{
std
::
cerr
<<
"ERROR: Invalid progress argument, must be unique value..."
<<
std
::
endl
;
return
fals
e
;
return
tru
e
;
}
if
(
val
[
0
]
==
"1"
||
val
[
0
]
==
"true"
)
{
...
...
@@ -243,11 +243,11 @@ CommandLineLauncher::BeforeExecute()
// Force to reload the application, the LoadParameters can change wrong values
this
->
LoadApplication
();
this
->
DisplayHelp
();
return
fals
e
;
return
tru
e
;
}
}
return
tru
e
;
return
fals
e
;
}
bool
...
...
@@ -264,10 +264,10 @@ CommandLineLauncher::LoadPath()
}
else
{
return
fals
e
;
return
tru
e
;
}
return
tru
e
;
return
fals
e
;
}
...
...
@@ -779,7 +779,7 @@ CommandLineLauncher::DisplayParameterHelp( const Parameter::Pointer & param, con
bool
CommandLineLauncher
::
CheckUnicity
()
{
bool
res
=
tru
e
;
bool
res
=
fals
e
;
// Extract expression keys
std
::
vector
<
std
::
string
>
keyList
=
m_Parser
->
GetKeyList
(
m_Expression
);
...
...
@@ -793,11 +793,11 @@ CommandLineLauncher::CheckUnicity()
{
if
(
keyRef
==
listTmp
[
j
]
)
{
res
=
fals
e
;
res
=
tru
e
;
break
;
}
}
if
(
res
==
fals
e
)
if
(
res
==
tru
e
)
break
;
}
...
...
@@ -807,7 +807,7 @@ CommandLineLauncher::CheckUnicity()
bool
CommandLineLauncher
::
CheckParametersPrefix
()
{
bool
res
=
tru
e
;
bool
res
=
fals
e
;
// Extract Expression elements
std
::
vector
<
itksys
::
String
>
spaceSplittedExp
=
itksys
::
SystemTools
::
SplitString
(
m_Expression
.
c_str
(),
' '
,
false
);
// if the chain is " module", SplitString will return: [ ], [module]
...
...
@@ -826,7 +826,7 @@ CommandLineLauncher::CheckParametersPrefix()
// Check if the chain "--" appears at least one time
if
(
m_Expression
.
find
(
"--"
)
==
std
::
string
::
npos
)
{
res
=
fals
e
;
res
=
tru
e
;
}
}
...
...
@@ -836,7 +836,7 @@ CommandLineLauncher::CheckParametersPrefix()
bool
CommandLineLauncher
::
CheckKeyValidity
()
{
bool
res
=
tru
e
;
bool
res
=
fals
e
;
// Extract expression keys
std
::
vector
<
std
::
string
>
expKeyList
=
m_Parser
->
GetKeyList
(
m_Expression
);
...
...
@@ -860,7 +860,7 @@ CommandLineLauncher::CheckKeyValidity()
}
if
(
keyExist
==
false
)
{
res
=
fals
e
;
res
=
tru
e
;
break
;
}
}
...
...
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