Remove internal media/base/ stringstream usages
The %f -> %g changes are there to make the SimpleStringBuilder behave like stringstream/cout and friends. With %f it prints e.g. 2.2 as 2.200000. This change also makes it use scientific notation for numbers > 1000000, like the other streams. Bug: webrtc:8982 Change-Id: Id174b02c5776460607f48efc196a08673b67eeb0 Reviewed-on: https://webrtc-review.googlesource.com/67080 Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23094}
This commit is contained in:
@ -67,15 +67,15 @@ SimpleStringBuilder& SimpleStringBuilder::operator<<(
|
||||
}
|
||||
|
||||
SimpleStringBuilder& SimpleStringBuilder::operator<<(float f) {
|
||||
return AppendFormat("%f", f);
|
||||
return AppendFormat("%g", f);
|
||||
}
|
||||
|
||||
SimpleStringBuilder& SimpleStringBuilder::operator<<(double f) {
|
||||
return AppendFormat("%f", f);
|
||||
return AppendFormat("%g", f);
|
||||
}
|
||||
|
||||
SimpleStringBuilder& SimpleStringBuilder::operator<<(long double f) {
|
||||
return AppendFormat("%Lf", f);
|
||||
return AppendFormat("%Lg", f);
|
||||
}
|
||||
|
||||
SimpleStringBuilder& SimpleStringBuilder::AppendFormat(const char* fmt, ...) {
|
||||
|
||||
Reference in New Issue
Block a user