llvm.org GIT mirror llvm / 800473c
Get rid of some cruft in the insert method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14704 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 16 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
8383 /// @returns true iff the element was inserted into the SetVector.
8484 /// @brief Insert a new element into the SetVector.
8585 bool insert( const value_type& X ) {
86 std::pair insertion_result = set_.insert(X);
87 if ( insertion_result.second ) {
86 bool result = set_.insert(X).second;
87 if ( result ) {
8888 vector_.push_back(X);
8989 }
90 return insertion_result.second;
90 return result;
9191 }
9292
9393 /// @returns 0 if the element is not in the SetVector, 1 if it is.
8383 /// @returns true iff the element was inserted into the SetVector.
8484 /// @brief Insert a new element into the SetVector.
8585 bool insert( const value_type& X ) {
86 std::pair insertion_result = set_.insert(X);
87 if ( insertion_result.second ) {
86 bool result = set_.insert(X).second;
87 if ( result ) {
8888 vector_.push_back(X);
8989 }
90 return insertion_result.second;
90 return result;
9191 }
9292
9393 /// @returns 0 if the element is not in the SetVector, 1 if it is.