diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-02-08 19:37:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-02-08 19:37:30 +0000 |
commit | 222c18d18afe76228775c0d73004e9c77bea611e (patch) | |
tree | ed35ad3b6c517842271ae8c816888d0ee328e198 /libs/pbd/id.cc | |
parent | ea63af333e2bb159666c42b364aedcda8f40c4ef (diff) |
add copy constructor for PBD::ID
git-svn-id: svn://localhost/ardour2/branches/3.0@6650 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/id.cc')
-rw-r--r-- | libs/pbd/id.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/pbd/id.cc b/libs/pbd/id.cc index 25c96c305e..b96863b0fa 100644 --- a/libs/pbd/id.cc +++ b/libs/pbd/id.cc @@ -48,6 +48,11 @@ ID::ID () _id = _counter++; } +ID::ID (const ID& other) +{ + _id = other._id; +} + ID::ID (string str) { string_assign (str); @@ -85,6 +90,15 @@ ID::operator= (string str) return *this; } +ID& +ID::operator= (const ID& other) +{ + if (&other != this) { + _id = other._id; + } + return *this; +} + ostream& operator<< (ostream& ostr, const ID& _id) { |