mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-22 20:58:10 +08:00
Remove explicit default destructors (#157)
From CppCoreGuidelines: Rule of Zero: C.20: If you can avoid defining default operations, do. C.52: Use inheriting constructors to import constructors into a derived class that does not need further explicit initialization. DRY forward and using declarations. Miscellaneous: Fix format.sh to output examples with normalised paths in sorted order. Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:

committed by
GitHub

parent
b3a333b417
commit
21d746e858
@@ -22,8 +22,7 @@ using Components = std::vector<Component>;
|
||||
/// @ingroup component
|
||||
class ComponentBase {
|
||||
public:
|
||||
// Constructor/Destructor.
|
||||
ComponentBase() = default;
|
||||
// virtual Destructor.
|
||||
virtual ~ComponentBase();
|
||||
|
||||
// Component hierarchy:
|
||||
@@ -73,8 +72,6 @@ class ComponentBase {
|
||||
ComponentBase* parent_ = nullptr;
|
||||
};
|
||||
|
||||
using Component = std::shared_ptr<ComponentBase>;
|
||||
|
||||
} // namespace ftxui
|
||||
|
||||
#endif /* end of include guard: FTXUI_COMPONENT_BASE_HPP */
|
||||
|
Reference in New Issue
Block a user