From bbbb0374bb19b2a09d54d3da26373ba5b5400f0a Mon Sep 17 00:00:00 2001 From: "jar@chromium.org" Date: Wed, 11 Mar 2009 20:55:54 +0000 Subject: Minor nits in IO buffer While doing restructuring work on filters, I read some of the IObuffer code, and it scared me a bit that there was a public constructor taking a data buffer that was then destroyed. After searching around for how this was used, I realized it is only used by the derived class, and thought that making it protected would save other folks from wondering/searching/checking. Since the size type in other constuctory was int rather than size_t, I also added a DCHECK (mostly out of paranoia). r=rvargas Review URL: http://codereview.chromium.org/43086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11479 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/io_buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/base/io_buffer.cc') diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc index c9b4532..c2401ab 100644 --- a/net/base/io_buffer.cc +++ b/net/base/io_buffer.cc @@ -9,7 +9,7 @@ namespace net { IOBuffer::IOBuffer(int buffer_size) { - DCHECK(buffer_size); + DCHECK(buffer_size > 0); data_ = new char[buffer_size]; } -- cgit v1.1