diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-07-10 06:46:19 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-07-10 06:46:19 +0000 |
commit | ccc131cb7eeb7ae241dc734ddb9df17128997249 (patch) | |
tree | 20a49d15ae1339ea02b61134be730dabeea865e1 | |
parent | 5fee0bd9718f1318bf74313b6605d19018e131cb (diff) | |
download | ATCD-ccc131cb7eeb7ae241dc734ddb9df17128997249.tar.gz |
ChangeLogTag:Fri Jul 9 23:45:25 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | ace/RB_Tree.h | 17 | ||||
-rw-r--r-- | ace/RB_Tree.inl | 11 |
3 files changed, 26 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog index 69a14364469..f5c315e575e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Fri Jul 9 23:45:25 2004 Ossama Othman <ossama@dre.vanderbilt.edu> + + * ace/RB_Tree.h (ACE_RB_Tree_Base::allocator): + * ace/RB_Tree.inl: + + This non-template class method is inlined in the RB_Tree.h + header rather than in RB_Tree.inl since that file may be + included multiple times when inlining is disabled and on + platforms where ACE_TEMPLATES_REQUIRE_SOURCE is defined. In + those platform/configuration combinations, multiple definitions + of this method occured. Placing the definition inline in the + header avoids such errors. + Fri Jul 9 21:23:13 2004 Douglas C. Schmidt <schmidt@cs.wustl.edu> * ace/RB_Tree.{h,inl,cpp}: Fixed a number of bugs pertaining to diff --git a/ace/RB_Tree.h b/ace/RB_Tree.h index 6c31c358eef..f5e6dc84b12 100644 --- a/ace/RB_Tree.h +++ b/ace/RB_Tree.h @@ -49,9 +49,18 @@ public: /// Search result enumeration. enum RB_SearchResult {LEFT, EXACT, RIGHT}; - /// get the allocator; - ACE_Allocator * allocator () const; - + /// Get the allocator; + /** + * @note This method is inlined here rather than in RB_Tree.inl + * since that file may be included multiple times when + * inlining is disabled and on platforms where + * @c ACE_TEMPLATES_REQUIRE_SOURCE is defined. In those + * platform/configuration combinations, multiple definitions + * of this method occured. Placing the definition inline in + * the header avoids such errors. + */ + ACE_Allocator * allocator (void) const { return this->allocator_; } + protected: // = Protected members. @@ -125,7 +134,7 @@ private: /// Pointer to node's right child. ACE_RB_Tree_Node<EXT_ID, INT_ID> *right_; - + /// Pointer to tree base (to get the allocator). const ACE_RB_Tree_Base *tree_; }; diff --git a/ace/RB_Tree.inl b/ace/RB_Tree.inl index 2bcac92801b..cad46c4cbc3 100644 --- a/ace/RB_Tree.inl +++ b/ace/RB_Tree.inl @@ -122,17 +122,6 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r) //////////////////////////////////////////////////////////////////////// -// class ACE_RB_Tree_Base // -//////////////////////////////////////////////////////////////////////// - -// Accessor for allocator - -ACE_INLINE ACE_Allocator * ACE_RB_Tree_Base::allocator () const -{ - return allocator_; -} - -//////////////////////////////////////////////////////////////////////// // template class ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> // //////////////////////////////////////////////////////////////////////// |