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

Unified Diff: webrtc/base/optional_ios.h

Issue 1813763005: Updated structures and functions for setting the max bitrate limit to take rtc::Optional<int> Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
Index: webrtc/base/optional_ios.h
diff --git a/webrtc/base/optional_ios.h b/webrtc/base/optional_ios.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d1092a4ba4314272c8edebbaee51fd2012219db
--- /dev/null
+++ b/webrtc/base/optional_ios.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2015 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_BASE_OPTIONAL_IOS_H_
+#define WEBRTC_BASE_OPTIONAL_IOS_H_
+
+#include <ostream>
+#include "webrtc/base/optional.h"
+
+namespace rtc {
+
+// Contains function definitions to allow writing rtc::Optional<T> to ostreams.
+// Allows for simpler logging of rtc::Optional<T> values.
+
+template <typename T>
+std::ostream& operator<<(std::ostream& stream, rtc::Optional<T> value) {
+ if (value) {
+ stream << *value;
+ } else {
+ stream << "<not set>";
+ }
+ return stream;
+}
pthatcher1 2016/03/17 21:51:28 Can we put this in optional.h? Is the dependency
skvlad 2016/03/18 00:49:17 Ok - moved it to optional.h. The ostream dependenc
+
+} // namespace rtc
+
+#endif // WEBRTC_BASE_OPTIONAL_IOS_H_

Powered by Google App Engine
This is Rietveld 408576698