Index: webrtc/call/call.h |
diff --git a/webrtc/call/call.h b/webrtc/call/call.h |
index 06479890ce151c4d8b667d489aaf7dff2f87e0be..d7240549a227c9285e72dfaceec0d138136c6053 100644 |
--- a/webrtc/call/call.h |
+++ b/webrtc/call/call.h |
@@ -10,6 +10,7 @@ |
#ifndef WEBRTC_CALL_CALL_H_ |
#define WEBRTC_CALL_CALL_H_ |
+#include <algorithm> |
#include <memory> |
#include <string> |
#include <vector> |
@@ -39,6 +40,17 @@ enum class MediaType { |
DATA |
}; |
+template <typename T> |
+static T MinPositive(T a, T b) { |
Taylor Brandstetter
2017/06/09 17:43:58
As long as we're moving this, can we add a comment
holmer
2017/06/12 11:46:56
+1
|
+ if (a <= 0) { |
+ return b; |
+ } |
+ if (b <= 0) { |
+ return a; |
+ } |
+ return std::min(a, b); |
+} |
+ |
class PacketReceiver { |
public: |
enum DeliveryStatus { |