Add support for unsigned parameters in FieldTrialParser
Bug: webrtc:10932 Change-Id: I3f56244a6be532065e4096cf1a289e27a032bc44 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150886 Commit-Queue: Björn Terelius <terelius@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29018}
This commit is contained in:
committed by
Commit Bot
parent
f3a197e553
commit
9f00f0e533
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#include "rtc_base/experiments/struct_parameters_parser.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -31,6 +33,9 @@ inline void StringEncode(std::string* target, double val) {
|
||||
inline void StringEncode(std::string* target, int val) {
|
||||
*target += rtc::ToString(val);
|
||||
}
|
||||
inline void StringEncode(std::string* target, unsigned val) {
|
||||
*target += rtc::ToString(val);
|
||||
}
|
||||
inline void StringEncode(std::string* target, DataRate val) {
|
||||
*target += webrtc::ToString(val);
|
||||
}
|
||||
@ -62,8 +67,10 @@ void TypedParser<T>::Encode(const void* src, std::string* target) {
|
||||
template class TypedParser<bool>;
|
||||
template class TypedParser<double>;
|
||||
template class TypedParser<int>;
|
||||
template class TypedParser<unsigned>;
|
||||
template class TypedParser<absl::optional<double>>;
|
||||
template class TypedParser<absl::optional<int>>;
|
||||
template class TypedParser<absl::optional<unsigned>>;
|
||||
|
||||
template class TypedParser<DataRate>;
|
||||
template class TypedParser<DataSize>;
|
||||
|
||||
Reference in New Issue
Block a user