diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-11 13:44:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-05-12 22:11:06 +0200 |
| commit | 8eedbed6e1f5b59e9714d7f857f486d8cf5f9434 (patch) | |
| tree | 98116bad4d80b9a5fd21baca65f92bfe2c03478d /src/lib/font.cc | |
| parent | d42d9740f542ac93f21b21ec9fab8558f9e87037 (diff) | |
Allow copy-construction of Font.
Diffstat (limited to 'src/lib/font.cc')
| -rw-r--r-- | src/lib/font.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/font.cc b/src/lib/font.cc index f3fbc6897..955a2ad1c 100644 --- a/src/lib/font.cc +++ b/src/lib/font.cc @@ -44,6 +44,24 @@ Font::Font (cxml::NodePtr node) } +Font::Font(Font const& other) + : _id(other._id) + , _content(other._content) +{ + +} + + +Font& Font::operator=(Font const& other) +{ + if (&other != this) { + _id = other._id; + _content = other._content; + } + return *this; +} + + void Font::as_xml (xmlpp::Node* node) { |
