diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-10-18 13:18:47 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-10-18 13:18:47 +0000 |
commit | 4085309cdb07f011756a9ab90047037ef9ad8f20 (patch) | |
tree | 22fb3764a0b8120a06397b3605c59589be5f78d8 /libs/pbd/id.cc | |
parent | 9ec965a54eb9bafa6fa0cf4837809189affac49f (diff) |
make Stateful::_id private and provide appropriate methods to set it, and use them throughout ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@10222 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/id.cc')
-rw-r--r-- | libs/pbd/id.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/pbd/id.cc b/libs/pbd/id.cc index b96863b0fa..d7ac1560a1 100644 --- a/libs/pbd/id.cc +++ b/libs/pbd/id.cc @@ -44,8 +44,7 @@ ID::init () ID::ID () { - Glib::Mutex::Lock lm (*counter_lock); - _id = _counter++; + reset (); } ID::ID (const ID& other) @@ -58,6 +57,13 @@ ID::ID (string str) string_assign (str); } +void +ID::reset () +{ + Glib::Mutex::Lock lm (*counter_lock); + _id = _counter++; +} + int ID::string_assign (string str) { |