Index: tools/gn/source_dir.h |
diff --git a/tools/gn/source_dir.h b/tools/gn/source_dir.h |
index 99be5c37ec7b12e556cc6968e0ab9d36364e4b7d..719579b15ede8f07eb0fdbd248dbb3ef6e6012ed 100644 |
--- a/tools/gn/source_dir.h |
+++ b/tools/gn/source_dir.h |
@@ -5,6 +5,7 @@ |
#ifndef TOOLS_GN_SOURCE_DIR_H_ |
#define TOOLS_GN_SOURCE_DIR_H_ |
+#include <algorithm> |
#include <string> |
#include "base/containers/hash_tables.h" |
@@ -90,6 +91,10 @@ class SourceDir { |
return value_ < other.value_; |
} |
+ void swap(SourceDir& other) { |
+ value_.swap(other.value_); |
+ } |
+ |
private: |
friend class SourceFile; |
std::string value_; |
@@ -114,4 +119,8 @@ inline size_t hash_value(const SourceDir& v) { |
} // namespace BASE_HASH_NAMESPACE |
+inline void swap(SourceDir& lhs, SourceDir& rhs) { |
+ lhs.swap(rhs); |
+} |
+ |
#endif // TOOLS_GN_SOURCE_DIR_H_ |