Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
9b0259cd
Commit
9b0259cd
authored
Feb 09, 2021
by
Laurențiu Nicola
Browse files
COMP: Catch bad_any_cast by reference, not value
parent
e79bebec
Pipeline
#6799
passed with stages
in 160 minutes and 43 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Modules/Core/Transform/include/otbRPCTransformBase.hxx
View file @
9b0259cd
...
...
@@ -38,13 +38,13 @@ bool RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::SetMeta
{
this
->
m_RPCParam
=
std
::
make_unique
<
Projection
::
RPCParam
>
(
boost
::
any_cast
<
Projection
::
RPCParam
>
(
imd
[
MDGeom
::
RPC
]));
}
catch
(
boost
::
bad_any_cast
)
catch
(
const
boost
::
bad_any_cast
&
)
{
return
false
;
}
constexpr
bool
useDEM
=
NInputDimensions
==
2
?
true
:
false
;
this
->
m_Transformer
=
std
::
make_unique
<
GDALRPCTransformer
>
(
*
m_RPCParam
,
useDEM
);
this
->
m_Transformer
=
std
::
make_unique
<
GDALRPCTransformer
>
(
*
m_RPCParam
,
useDEM
);
return
true
;
}
...
...
@@ -64,6 +64,6 @@ void RPCTransformBase<TScalarType, NInputDimensions, NOutputDimensions>::PrintSe
os
<<
indent
<<
"RPC Model: "
<<
this
->
m_RPCParam
.
get
()
->
ToJSON
()
<<
std
::
endl
;
}
}
}
// namespace otb
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment