aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-08 21:50:33 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-08 21:50:33 +0000
commit800473c8df8f0c9b566c9216bf124495451cb573 (patch)
tree74d7323c09966ec51217be896e58f5f1ea122169 /include/llvm/ADT
parentf3f63824238b383946e921328e45246f2dd8bfdb (diff)
downloadexternal_llvm-800473c8df8f0c9b566c9216bf124495451cb573.zip
external_llvm-800473c8df8f0c9b566c9216bf124495451cb573.tar.gz
external_llvm-800473c8df8f0c9b566c9216bf124495451cb573.tar.bz2
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
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/SetVector.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h
index be3c692..a6e3f85 100644
--- a/include/llvm/ADT/SetVector.h
+++ b/include/llvm/ADT/SetVector.h
@@ -84,11 +84,11 @@ public:
/// @returns true iff the element was inserted into the SetVector.
/// @brief Insert a new element into the SetVector.
bool insert( const value_type& X ) {
- std::pair<typename set_type::iterator,bool> insertion_result = set_.insert(X);
- if ( insertion_result.second ) {
+ bool result = set_.insert(X).second;
+ if ( result ) {
vector_.push_back(X);
}
- return insertion_result.second;
+ return result;
}
/// @returns 0 if the element is not in the SetVector, 1 if it is.