mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
express: Fix a comment in datagram.cxx
[skip ci]
This commit is contained in:
parent
a9e5d84d27
commit
75b12fe6e2
@ -113,8 +113,8 @@ pad_bytes(size_t size) {
|
|||||||
// Now append the data.
|
// Now append the data.
|
||||||
|
|
||||||
// It is very important that we *don't* do this reserve() operation. See
|
// It is very important that we *don't* do this reserve() operation. See
|
||||||
// the further comments in append_data(), below. _data.reserve(_data.size()
|
// the further comments in append_data(), below.
|
||||||
// + size);
|
//_data.reserve(_data.size() + size);
|
||||||
|
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
_data.push_back('\0');
|
_data.push_back('\0');
|
||||||
@ -146,7 +146,8 @@ append_data(const void *data, size_t size) {
|
|||||||
// actually slows it down on Windows, which takes the reserve() request as a
|
// actually slows it down on Windows, which takes the reserve() request as a
|
||||||
// fixed size the array should be set to (!) instead of as a minimum size to
|
// fixed size the array should be set to (!) instead of as a minimum size to
|
||||||
// guarantee. This forces the array to reallocate itself with *every* call
|
// guarantee. This forces the array to reallocate itself with *every* call
|
||||||
// to append_data! _data.reserve(_data.size() + size);
|
// to append_data!
|
||||||
|
//_data.reserve(_data.size() + size);
|
||||||
|
|
||||||
_data.v().insert(_data.v().end(), (const unsigned char *)data,
|
_data.v().insert(_data.v().end(), (const unsigned char *)data,
|
||||||
(const unsigned char *)data + size);
|
(const unsigned char *)data + size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user