Commit 0b7bae55 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clang-tidy: fix `modernize-use-equals-default` lints

parent 3f0860d7
......@@ -15,7 +15,7 @@
*/
struct AttDefContainer
{
AttDefContainer(){};
AttDefContainer() = default;
std::string Type;
std::string BaseType;
......
......@@ -61,7 +61,7 @@ public:
*/
struct Container
{
Container(){};
Container() = default;
smtk::attribute::ItemDefinitionPtr ItemDefinition;
smtk::attribute::DefinitionPtr Definition;
......
......@@ -102,7 +102,7 @@ public:
, m_required(false)
{
}
~Analysis() {}
~Analysis() = default;
std::string m_name; ///< Name of the Analysis
Analysis* m_parent; ///< Analysis' Parent
......
......@@ -181,7 +181,7 @@ public:
Set::CombinationMode m_includeMode, m_excludeMode, m_combinationMode;
std::set<std::string> m_includedCategories, m_excludedCategories;
};
Categories() {}
Categories() = default;
///@{
/// \brief Returns true if atleast one of its sets passes its check
bool passes(const std::set<std::string>& cats) const;
......
......@@ -28,7 +28,7 @@ class ValueItemDefinitionTemplate : public smtk::attribute::ValueItemDefinition
public:
typedef DataT DataType;
~ValueItemDefinitionTemplate() override {}
~ValueItemDefinitionTemplate() override = default;
const DataT& defaultValue() const;
const DataT& defaultValue(std::size_t element) const;
......
......@@ -39,7 +39,7 @@ public:
typedef value_type const_iterator;
typedef ValueItemDefinitionTemplate<DataType> DefType;
~ValueItemTemplate() override {}
~ValueItemTemplate() override = default;
typename std::vector<DataT>::const_iterator begin() const { return m_values.begin(); }
typename std::vector<DataT>::const_iterator end() const { return m_values.end(); }
bool setNumberOfValues(std::size_t newSize) override;
......
......@@ -36,14 +36,10 @@ namespace common
class SMTKCORE_EXPORT FileLocation
{
public:
FileLocation()
{
m_filePath = std::string();
m_referencePath = std::string();
}
FileLocation() = default;
FileLocation(const std::string& filePath, const std::string& refPath = std::string());
FileLocation(const FileLocation& other);
virtual ~FileLocation() {}
virtual ~FileLocation() = default;
std::string absolutePath() const;
std::string relativePath() const;
......@@ -55,12 +51,7 @@ public:
m_filePath.clear();
m_referencePath.clear();
}
FileLocation& operator=(const FileLocation& from)
{
m_filePath = from.m_filePath;
m_referencePath = from.m_referencePath;
return *this;
}
FileLocation& operator=(const FileLocation& from) = default;
bool operator==(const FileLocation& from) const;
bool operator==(const std::string& from) const { return *this == FileLocation(from); }
......
......@@ -111,7 +111,7 @@ public:
{
}
virtual ~GeneratorBase() {}
virtual ~GeneratorBase() = default;
/// A discriminating method to determine whether or not the input should be
/// considered for use as input by a generator type. If this method returns
......
......@@ -81,7 +81,7 @@ struct Link : base_type
{
}
~Link() override {}
~Link() override = default;
id_type id;
left_type left;
......@@ -241,7 +241,7 @@ class Links : public detail::LinkContainer<id_type, left_type, right_type, role_
public:
static const role_type undefinedRole;
virtual ~Links() {}
virtual ~Links() = default;
/// The "Left", "Right" and "Role" tags facilitate access to views into the
/// container that are sorted according to the left, right or role values,
......
......@@ -23,8 +23,8 @@ public:
static typename T::Ptr& instance();
private:
virtual ~Singleton() {}
inline explicit Singleton() {}
virtual ~Singleton() = default;
inline explicit Singleton() = default;
};
template<typename T>
......
......@@ -38,7 +38,7 @@ namespace common
class SMTKCORE_EXPORT TypeMapEntryBase
{
public:
virtual ~TypeMapEntryBase() {}
virtual ~TypeMapEntryBase() = default;
virtual void to_json(nlohmann::json&) const {}
virtual void from_json(const nlohmann::json&) {}
......@@ -58,7 +58,7 @@ class SMTK_ALWAYS_EXPORT TypeMapEntry : public TypeMapEntryBase
protected:
/// Construction of this class is delegated to TypeMap.
TypeMapEntry() {}
TypeMapEntry() = default;
public:
typedef KeyType key_type;
......@@ -266,6 +266,8 @@ class SMTK_ALWAYS_EXPORT TypeMap : public TypeMapBase<KeyType>
public:
typedef KeyType key_type;
// MSVC sees `= default` as a duplicate of the template version.
// NOLINTNEXTLINE(modernize-use-equals-default)
TypeMap() {}
template<typename List>
......@@ -280,7 +282,7 @@ public:
insertTypes<List>();
}
~TypeMap() override {}
~TypeMap() override = default;
protected:
template<typename Type>
......
......@@ -47,7 +47,7 @@ namespace io
class SMTKDELAUNAYEXT_EXPORT ExportDelaunayMesh
{
public:
ExportDelaunayMesh() {}
ExportDelaunayMesh() = default;
ExportDelaunayMesh(const ExportDelaunayMesh&) = delete;
ExportDelaunayMesh& operator=(const ExportDelaunayMesh&) = delete;
......
......@@ -57,7 +57,7 @@ namespace io
class SMTKDELAUNAYEXT_EXPORT ImportDelaunayMesh
{
public:
ImportDelaunayMesh() {}
ImportDelaunayMesh() = default;
ImportDelaunayMesh(const ImportDelaunayMesh&) = delete;
ImportDelaunayMesh& operator=(const ImportDelaunayMesh&) = delete;
......
......@@ -32,7 +32,7 @@ public:
, m_view(view)
{
}
~qtAssociationWidget() override {}
~qtAssociationWidget() override = default;
///\brief Return true if there are persistent objects selected.
///
/// This comes in handy when a parent group view changes tabs. With this
......
......@@ -45,8 +45,8 @@ public:
QPointer<QWidget> parent,
qtBaseView* bview);
qtAttributeItemInfo() {}
virtual ~qtAttributeItemInfo() {}
qtAttributeItemInfo() = default;
virtual ~qtAttributeItemInfo() = default;
/// @{
/// \brief Methods to set and retrieve the item to be used by the generated qtItem
......
......@@ -54,8 +54,8 @@ public:
// {
// }
ViewInfo() {}
~ViewInfo() override {}
ViewInfo() = default;
~ViewInfo() override = default;
const smtk::view::Configuration* configuration() const override { return m_view.get(); }
......
......@@ -51,7 +51,7 @@ public:
// {
// }
OperationViewInfo() {}
OperationViewInfo() = default;
smtk::operation::OperationPtr m_operator;
};
......
......@@ -27,7 +27,7 @@ public:
{
}
~qtPrintLog() override {}
~qtPrintLog() override = default;
public slots:
void print()
......
......@@ -43,7 +43,7 @@ public:
protected:
vtkExtractImageBlock();
~vtkExtractImageBlock() override {}
~vtkExtractImageBlock() override = default;
int FillInputPortInformation(int port, vtkInformation* info) override;
int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
......
......@@ -29,7 +29,7 @@ class SMTKCORE_EXPORT Backend
{
public:
using index_t = std::size_t;
virtual ~Backend() {}
virtual ~Backend() = default;
/// Index is a compile-time intrinsic of the derived backend. It is used for disambiguation of backends.
virtual index_t index() const { return std::type_index(typeid(*this)).hash_code(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment