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

Unified Diff: src/inspector/String16.cpp

Issue 2336023002: [inspector] replaced std::snprintf with base::OS::SNPrintf (Closed)
Patch Set: Created 4 years, 3 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 | « src/inspector/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/String16.cpp
diff --git a/src/inspector/String16.cpp b/src/inspector/String16.cpp
index e14d19eee7440a8e763b212a6c7ea19142ed63db..506b2bdb2780a9f3b563c164d789c30971ed34b6 100644
--- a/src/inspector/String16.cpp
+++ b/src/inspector/String16.cpp
@@ -4,11 +4,11 @@
#include "src/inspector/String16.h"
+#include "src/base/platform/platform.h"
#include "src/inspector/ProtocolPlatform.h"
#include <algorithm>
#include <cctype>
-#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <locale>
@@ -362,7 +362,7 @@ static inline void putUTF8Triple(char*& buffer, UChar ch) {
String16 String16::fromInteger(int number) {
const size_t kBufferSize = 50;
char buffer[kBufferSize];
- std::snprintf(buffer, kBufferSize, "%d", number);
+ v8::base::OS::SNPrintF(buffer, kBufferSize, "%d", number);
return String16(buffer);
}
@@ -370,7 +370,7 @@ String16 String16::fromInteger(int number) {
String16 String16::fromDouble(double number) {
const size_t kBufferSize = 100;
char buffer[kBufferSize];
- std::snprintf(buffer, kBufferSize, "%f", number);
+ v8::base::OS::SNPrintF(buffer, kBufferSize, "%f", number);
return String16(buffer);
}
@@ -378,7 +378,7 @@ String16 String16::fromDouble(double number) {
String16 String16::fromDoublePrecision3(double number) {
const size_t kBufferSize = 100;
char buffer[kBufferSize];
- std::snprintf(buffer, kBufferSize, "%.3g", number);
+ v8::base::OS::SNPrintF(buffer, kBufferSize, "%.3g", number);
return String16(buffer);
}
@@ -386,7 +386,7 @@ String16 String16::fromDoublePrecision3(double number) {
String16 String16::fromDoublePrecision6(double number) {
const size_t kBufferSize = 100;
char buffer[kBufferSize];
- std::snprintf(buffer, kBufferSize, "%.6g", number);
+ v8::base::OS::SNPrintF(buffer, kBufferSize, "%.6g", number);
return String16(buffer);
}
« no previous file with comments | « src/inspector/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698