Zero bytes in padding, i.e. bytes between size_ and capacity_.
| 147 | |
| 148 | /// Zero bytes in padding, i.e. bytes between size_ and capacity_. |
| 149 | void ZeroPadding() { |
| 150 | #ifndef NDEBUG |
| 151 | CheckMutable(); |
| 152 | #endif |
| 153 | // A zero-capacity buffer can have a null data pointer |
| 154 | if (capacity_ != 0) { |
| 155 | memset(mutable_data() + size_, 0, static_cast<size_t>(capacity_ - size_)); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | /// \brief Construct a buffer that takes ownership of a container. |
| 160 | /// |
nothing calls this directly
no test coverage detected