Commit 992fcf25 authored by Murray Cumming's avatar Murray Cumming
Browse files

C++11: Use =default for simple destructors.

parent e3c2d3cf
......@@ -112,10 +112,6 @@ ConnectionPool::ConnectionPool()
{
}
ConnectionPool::~ConnectionPool()
{
}
//static
std::shared_ptr<ConnectionPool> ConnectionPool::get_instance()
{
......
......@@ -84,7 +84,7 @@ public:
//This are public for use by std::make_shared<>().
//TODO: Does this need to be virtual?
ConnectionPool();
virtual ~ConnectionPool();
virtual ~ConnectionPool() = default;
ConnectionPool(const ConnectionPool& src) = delete;
ConnectionPool(ConnectionPool&& src) = default;
......
......@@ -65,7 +65,8 @@ class Backend
{
friend class Glom::ConnectionPool;
public:
virtual ~Backend() {}
virtual ~Backend() = default;
typedef std::vector<std::shared_ptr<const Field> > type_vec_const_fields;
enum class InitErrors
......
......@@ -28,10 +28,6 @@ HasTitleSingular::HasTitleSingular()
{
}
HasTitleSingular::~HasTitleSingular()
{
}
bool HasTitleSingular::operator==(const HasTitleSingular& src) const
{
const bool bResult = (m_title_singular == src.m_title_singular);
......
......@@ -36,7 +36,7 @@ public:
HasTitleSingular();
HasTitleSingular(const HasTitleSingular& src) = default;
HasTitleSingular(HasTitleSingular&& src) = default;
virtual ~HasTitleSingular();
virtual ~HasTitleSingular() = default;
HasTitleSingular& operator=(const HasTitleSingular& src) = default;
HasTitleSingular& operator=(HasTitleSingular&& src) = default;
......
......@@ -58,10 +58,6 @@ LayoutItem::LayoutItem(const LayoutItem& src)
m_positions = std::make_unique<PrintLayoutPosition>(*(src.m_positions));
}
LayoutItem::~LayoutItem()
{
}
LayoutItem& LayoutItem::operator=(const LayoutItem& src)
{
if(this == &src)
......
......@@ -36,7 +36,7 @@ public:
LayoutItem(LayoutItem&& src) = default;
LayoutItem& operator=(const LayoutItem& src);
LayoutItem& operator=(LayoutItem&& src) = default;
~LayoutItem() override;
~LayoutItem() override = default;
/** Create a new copied instance.
* This allows us to deep-copy a list of LayoutItems.
......
......@@ -31,10 +31,6 @@ TranslatableItem::TranslatableItem() noexcept
{
}
TranslatableItem::~TranslatableItem()
{
}
bool TranslatableItem::operator==(const TranslatableItem& src) const noexcept
{
bool bResult = (m_name == src.m_name)
......
......@@ -35,7 +35,7 @@ public:
TranslatableItem() noexcept;
TranslatableItem(const TranslatableItem& src) = default;
TranslatableItem(TranslatableItem&& src) = default;
virtual ~TranslatableItem();
virtual ~TranslatableItem() = default;
TranslatableItem& operator=(const TranslatableItem& src) = default;
TranslatableItem& operator=(TranslatableItem&& src) = default;
......
......@@ -36,10 +36,6 @@ Document::Document()
m_view = nullptr;
}
Document::~Document()
{
}
Glib::ustring Document::get_file_uri() const
{
return m_file_uri;
......
......@@ -34,7 +34,7 @@ class Document
{
public:
Document();
virtual ~Document();
virtual ~Document() = default;
/* Saves the data to disk.
* Asks the View to update this document before saving to disk,
......
......@@ -25,10 +25,6 @@ ViewBase::ViewBase()
{
}
ViewBase::~ViewBase()
{
}
void ViewBase::load_from_document()
{
}
......
......@@ -32,7 +32,7 @@ class ViewBase : virtual public sigc::trackable
{
public:
ViewBase();
virtual ~ViewBase();
virtual ~ViewBase() = default;
virtual void load_from_document();
virtual void save_to_document();
......
......@@ -42,10 +42,6 @@ PyGlomRecord::PyGlomRecord()
{
}
PyGlomRecord::~PyGlomRecord()
{
}
void PyGlomRecord::set_read_only()
{
m_read_only = true;
......
......@@ -36,7 +36,7 @@ class PyGlomRecord
{
public:
PyGlomRecord();
~PyGlomRecord();
~PyGlomRecord() = default;
/* Prevent python code from changing data in the database via this object.
* For instance, this should be used in a field calculation,
......
......@@ -29,11 +29,6 @@ PyGlomRelated::PyGlomRelated()
{
}
PyGlomRelated::~PyGlomRelated()
{
}
PyGlomRelated::type_map_relationships::size_type PyGlomRelated::len() const
{
return m_map_relationships.size();
......
......@@ -35,7 +35,7 @@ class PyGlomRelated
{
public:
PyGlomRelated();
~PyGlomRelated();
~PyGlomRelated() = default;
typedef std::unordered_map<Glib::ustring, std::shared_ptr<Relationship> , std::hash<std::string>> type_map_relationships;
void set_relationships(const PyGlomRelated::type_map_relationships& relationships);
......
......@@ -34,11 +34,6 @@ PyGlomRelatedRecord::PyGlomRelatedRecord()
{
}
PyGlomRelatedRecord::~PyGlomRelatedRecord()
{
}
static void RelatedRecord_HandlePythonError()
{
if(PyErr_Occurred())
......
......@@ -36,7 +36,7 @@ class PyGlomRelatedRecord
{
public:
PyGlomRelatedRecord();
~PyGlomRelatedRecord();
~PyGlomRelatedRecord() = default;
void set_relationship(const std::shared_ptr<const Relationship>& relationship, const Gnome::Gda::Value& from_key_value, const std::shared_ptr<const Document>& document);
......
......@@ -35,10 +35,6 @@ PyGlomUI::PyGlomUI(const PythonUICallbacks& callbacks)
{
}
PyGlomUI::~PyGlomUI()
{
}
void PyGlomUI::show_table_details(const std::string& table_name, const boost::python::object& primary_key_value)
{
if(!m_callbacks || !(m_callbacks->m_slot_show_table_details))
......
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