MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / BufferHasRoom

Method BufferHasRoom

src/settingsgen/settingsgen.cpp:130–134  ·  view source on GitHub ↗

* Does the buffer have room without adding a new #OutputBuffer block? * @return \c true if room is available, else \c false. */

Source from the content-addressed store, hash-verified

128 * @return \c true if room is available, else \c false.
129 */
130 bool BufferHasRoom() const
131 {
132 size_t num_blocks = this->output_buffer.size();
133 return num_blocks > 0 && this->output_buffer[num_blocks - 1].HasRoom();
134 }
135
136 typedef std::vector<OutputBuffer> OutputBufferVector; ///< Vector type for output buffers.
137 OutputBufferVector output_buffer; ///< Vector of blocks containing the stored output.

Callers 1

AddMethod · 0.95

Calls 2

HasRoomMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected