Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Modules
Visualization
Commits
09899148
Commit
09899148
authored
Jul 20, 2018
by
Mark OLESEN
Browse files
STYLE: use sigFpe::ignore helper class in runTimePostProcessing (issue #897)
parent
e03122da
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/runTimePostProcessing/runTimePostProcessing.C
View file @
09899148
...
...
@@ -145,13 +145,11 @@ bool Foam::functionObjects::runTimePostProcessing::write()
Info
<<
type
()
<<
" "
<<
name
()
<<
" output:"
<<
nl
<<
" Constructing scene"
<<
endl
;
// Unset any floating point trapping
// Disable any floating point trapping
// (some low-level rendering functionality does not like it)
const
bool
oldFpe
=
sigFpe
::
active
();
if
(
oldFpe
)
{
sigFpe
::
unset
();
}
sigFpe
::
ignore
sigFpeHandling
;
//<- disable in local scope
// Initialise render window
auto
renderWindow
=
vtkSmartPointer
<
vtkRenderWindow
>::
New
();
...
...
@@ -240,11 +238,12 @@ bool Foam::functionObjects::runTimePostProcessing::write()
surfaces_
[
i
].
clear
();
}
// Restore floating point trapping
if
(
oldFpe
)
{
sigFpe
::
set
();
}
// Instead of relying on the destructor, manually restore the previous
// SIGFPE state.
// This is only to avoid compiler complaints about unused variables.
sigFpeHandling
.
restore
();
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment