[llvm-commits] CVS: llvm/include/Support/SetVector.h
LLVM
llvm at cs.uiuc.edu
Thu Jul 8 16:51:02 PDT 2004
Changes in directory llvm/include/Support:
SetVector.h updated: 1.1 -> 1.2
---
Log message:
Get rid of some cruft in the insert method.
---
Diffs of the changes: (+3 -3)
Index: llvm/include/Support/SetVector.h
diff -u llvm/include/Support/SetVector.h:1.1 llvm/include/Support/SetVector.h:1.2
--- llvm/include/Support/SetVector.h:1.1 Thu Jul 8 14:36:21 2004
+++ llvm/include/Support/SetVector.h Thu Jul 8 16:50:33 2004
@@ -84,11 +84,11 @@
/// @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.
More information about the llvm-commits
mailing list