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:
@@ -53,15 +53,11 @@ namespace Freestyle {
|
||||
class TextStrokeRenderer : public StrokeRenderer {
|
||||
public:
|
||||
TextStrokeRenderer(const char *iFileName = NULL);
|
||||
virtual ~TextStrokeRenderer();
|
||||
|
||||
/*! Renders a stroke rep */
|
||||
virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const;
|
||||
virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const;
|
||||
|
||||
/*! Closes the output file */
|
||||
void Close();
|
||||
|
||||
protected:
|
||||
mutable ofstream _ofstream;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user