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

Side by Side Diff: src/ostreams.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow dchecks. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
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 "src/ostreams.h" 5 #include "src/ostreams.h"
6 6
7 #if V8_OS_WIN 7 #if V8_OS_WIN
8 #define snprintf sprintf_s 8 #define snprintf sprintf_s
9 #endif 9 #endif
10 10
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 30
31 std::streamsize OFStreamBase::xsputn(const char* s, std::streamsize n) { 31 std::streamsize OFStreamBase::xsputn(const char* s, std::streamsize n) {
32 return static_cast<std::streamsize>( 32 return static_cast<std::streamsize>(
33 std::fwrite(s, 1, static_cast<size_t>(n), f_)); 33 std::fwrite(s, 1, static_cast<size_t>(n), f_));
34 } 34 }
35 35
36 36
37 OFStream::OFStream(FILE* f) : std::ostream(nullptr), buf_(f) { 37 OFStream::OFStream(FILE* f) : std::ostream(nullptr), buf_(f) {
38 DCHECK_NOT_NULL(f); 38 DCHECK(f);
39 rdbuf(&buf_); 39 rdbuf(&buf_);
40 } 40 }
41 41
42 42
43 OFStream::~OFStream() {} 43 OFStream::~OFStream() {}
44 44
45 45
46 namespace { 46 namespace {
47 47
48 // Locale-independent predicates. 48 // Locale-independent predicates.
(...skipping 25 matching lines...) Expand all
74 return PrintUC16(os, c.value, IsOK); 74 return PrintUC16(os, c.value, IsOK);
75 } 75 }
76 76
77 77
78 std::ostream& operator<<(std::ostream& os, const AsUC16& c) { 78 std::ostream& operator<<(std::ostream& os, const AsUC16& c) {
79 return PrintUC16(os, c.value, IsPrint); 79 return PrintUC16(os, c.value, IsPrint);
80 } 80 }
81 81
82 } // namespace internal 82 } // namespace internal
83 } // namespace v8 83 } // namespace v8
OLDNEW
« src/jsregexp.cc ('K') | « src/optimizing-compiler-thread.cc ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698