Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Meel <ankitm>2020-11-17 14:40:03 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-11-17 15:03:25 +0300
commit88de58fd1af9ffb1c6afcc53cf6279aadc51f58c (patch)
tree522df7c86107edbabb1631d2e12014bafdc66c4b /source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
parent417224a31bb006ac59a7572809cc5976de0eb619 (diff)
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
Diffstat (limited to 'source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp')
-rw-r--r--source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
index 0e3fea3ddf8..11787e9f2a2 100644
--- a/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/PSStrokeRenderer.cpp
@@ -41,11 +41,6 @@ PSStrokeRenderer::PSStrokeRenderer(const char *iFileName)
_ofstream << "%%EndComments" << endl;
}
-PSStrokeRenderer::~PSStrokeRenderer()
-{
- Close();
-}
-
void PSStrokeRenderer::RenderStrokeRep(StrokeRep *iStrokeRep) const
{
RenderStrokeRepBasic(iStrokeRep);
@@ -90,11 +85,4 @@ void PSStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const
}
}
-void PSStrokeRenderer::Close()
-{
- if (_ofstream.is_open()) {
- _ofstream.close();
- }
-}
-
} /* namespace Freestyle */