Clang-tidy, fix bugprone-exception-escape.

Remove redundant call to `ofstream::close()` from `~PSStrokeRenderer`
and `~TextStrokeRenderer`. ofstream will be destructed automatically.

- For `~Depsgraph`, `std::function`'s constructor can throw.
- Passing throwing statements in the lambda will not be detected by
  clang-tidy.
Fix these issues by using lambda as function argument.

Reviewed By: sergey, sybren
Differential Revision: https://developer.blender.org/D9497
This commit is contained in:
Ankit Meel
2020-11-17 17:10:03 +05:30
committed by Ankit Meel
parent 417224a31b
commit 88de58fd1a
7 changed files with 5 additions and 38 deletions

View File

@@ -29,7 +29,6 @@ Checks: >
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-exception-escape,
-bugprone-redundant-branch-condition,
modernize-*,