Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: webrtc/call/call.h

Issue 2924393002: Move MinPositive to call.h (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698