You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2008/12/02 03:32:25 UTC

svn commit: r722337 - /incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp

Author: dreiss
Date: Mon Dec  1 18:32:25 2008
New Revision: 722337

URL: http://svn.apache.org/viewvc?rev=722337&view=rev
Log:
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.

Modified:
    incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp

Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp?rev=722337&r1=722336&r2=722337&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/PosixThreadFactory.cpp Mon Dec  1 18:32:25 2008
@@ -139,9 +139,8 @@
     }
   }
 
-  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(); }