diff options
author | David Robillard <d@drobilla.net> | 2012-05-11 23:54:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-11 23:54:17 +0000 |
commit | ff66c64ebad0761c726ef52b95ec4f2b41c9b853 (patch) | |
tree | 78aba9a5d86eb4bcf27c1d582a5bd017182bb739 /src/Thread.cpp | |
parent | 80266e43b4d21ea5eb4376dbedad02b767244cf7 (diff) | |
download | raul-ff66c64ebad0761c726ef52b95ec4f2b41c9b853.tar.gz raul-ff66c64ebad0761c726ef52b95ec4f2b41c9b853.tar.bz2 raul-ff66c64ebad0761c726ef52b95ec4f2b41c9b853.zip |
Improve some C++ style stuff.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4361 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Thread.cpp')
-rw-r--r-- | src/Thread.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp index 88919d2..e35d347 100644 --- a/src/Thread.cpp +++ b/src/Thread.cpp @@ -76,17 +76,13 @@ Thread::create_for_this_thread(const std::string& name) return new Thread(pthread_self(), name); } -/** Return the calling thread. - * The return value of this should NOT be cached unless the thread is - * explicitly user created with create(). - */ Thread& Thread::get() { Thread* this_thread = reinterpret_cast<Thread*>( pthread_getspecific(s_thread_key)); if (!this_thread) - this_thread = new Thread(); // sets thread-specific data + this_thread = create_for_this_thread(""); return *this_thread; } |