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

Method GetDataSetRange

src/graph_gui.cpp:266–269  ·  view source on GitHub ↗

* Get appropriate part of dataset values for the current number of horizontal points. * @param dataset Dataset to get values of * @returns span covering dataset's current valid range. */

Source from the content-addressed store, hash-verified

264 * @returns span covering dataset's current valid range.
265 */
266 std::span<const OverflowSafeInt64> GetDataSetRange(const DataSet &dataset) const
267 {
268 return {std::begin(dataset.values), std::begin(dataset.values) + this->num_on_x_axis};
269 }
270
271 /**
272 * Get the interval that contains the graph's data. Excluded data is ignored to show smaller values in

Callers 2

GetValuesIntervalMethod · 0.95
DrawGraphMethod · 0.95

Calls 1

beginFunction · 0.50

Tested by

no test coverage detected