AU: Some graph types and a couple utility functions
These will be used by the delta diff generator.
Review URL: http://codereview.chromium.org/578009
diff --git a/utils.h b/utils.h
index de998f4..9354ba5 100644
--- a/utils.h
+++ b/utils.h
@@ -80,6 +80,11 @@
return ret;
}
+template<typename T>
+bool VectorContainsValue(const std::vector<T>& vect, const T& value) {
+ return std::find(vect.begin(), vect.end(), value) != vect.end();
+}
+
// Returns the currently booted device. "/dev/sda1", for example.
// This will not interpret LABEL= or UUID=. You'll need to use findfs
// or something with equivalent funcionality to interpret those.