Panda3D
dtool
src
prc
streamWriter.cxx
1
// Filename: streamWriter.cxx
2
// Created by: drose (04Aug02)
3
//
4
////////////////////////////////////////////////////////////////////
5
//
6
// PANDA 3D SOFTWARE
7
// Copyright (c) Carnegie Mellon University. All rights reserved.
8
//
9
// All use of this software is subject to the terms of the revised BSD
10
// license. You should have received a copy of this license along
11
// with this source code in a file named "LICENSE."
12
//
13
////////////////////////////////////////////////////////////////////
14
15
#include "streamWriter.h"
16
17
////////////////////////////////////////////////////////////////////
18
// Function: StreamWriter::pad_bytes
19
// Access: Public
20
// Description: Adds the indicated number of zero bytes to the
21
// stream.
22
////////////////////////////////////////////////////////////////////
23
void
StreamWriter::
24
pad_bytes
(
size_t
size) {
25
nassertv((
int
)size >= 0);
26
27
while
(size > 0) {
28
_out->put(
'\0'
);
29
size--;
30
}
31
}
StreamWriter::pad_bytes
void pad_bytes(size_t size)
Adds the indicated number of zero bytes to the stream.
Definition:
streamWriter.cxx:24
Generated on Wed May 17 2017 23:39:39 for Panda3D by
1.8.13