summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2008-12-02 02:32:25 +0000
committerDavid Reiss <dreiss@apache.org>2008-12-02 02:32:25 +0000
commitfbb14ef1b33db23cb0862975af58bbba957d2378 (patch)
treeccd152e2b70aa5c54e648eba6b30355f88d15b63
parent428d5695ab6dd8a598b1be5bb29cfb7c90aa9414 (diff)
downloadthrift-fbb14ef1b33db23cb0862975af58bbba957d2378.tar.gz
THRIFT-214. cpp: Qualify a cast to fix OSX compilation
id_t is defined in some OSX header, and the id_t in this function resolved to that one instead of Thread::id_t. This change fully qualifies the type to make sure it resolves properly. Also remove a comment about eliminating the C-style cast, since it is actually quite appropriate in this case. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722337 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--lib/cpp/src/concurrency/PosixThreadFactory.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.cpp b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
index 599534170..001d6ad81 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.cpp
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
@@ -139,9 +139,8 @@ class PthreadThread: public Thread {
}
}
- id_t getId() {
- // TODO(dreiss): Stop using C-style casts.
- return (id_t)pthread_;
+ Thread::id_t getId() {
+ return (Thread::id_t)pthread_;
}
shared_ptr<Runnable> runnable() const { return Thread::runnable(); }