| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/ostreams.h" | 7 #include "src/ostreams.h" |
| 8 | 8 |
| 9 #if V8_CC_MSVC | 9 #if V8_OS_WIN |
| 10 #define snprintf sprintf_s | 10 #define snprintf sprintf_s |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 // Be lazy and delegate the value=>char conversion to snprintf. | 16 // Be lazy and delegate the value=>char conversion to snprintf. |
| 17 template<class T> | 17 template<class T> |
| 18 OStream& OStream::print(const char* format, T x) { | 18 OStream& OStream::print(const char* format, T x) { |
| 19 char buf[32]; | 19 char buf[32]; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return *this; | 152 return *this; |
| 153 } | 153 } |
| 154 | 154 |
| 155 | 155 |
| 156 OFStream& OFStream::flush() { | 156 OFStream& OFStream::flush() { |
| 157 if (f_) fflush(f_); | 157 if (f_) fflush(f_); |
| 158 return *this; | 158 return *this; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } } // namespace v8::internal | 161 } } // namespace v8::internal |
| OLD | NEW |