Make method const
This commit is contained in:
parent
7783cb8e5e
commit
ee3a17fd13
2 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ namespace curry {
|
||||||
std::copy(parProperties.begin(), parProperties.end(), m_tile_properties.begin());
|
std::copy(parProperties.begin(), parProperties.end(), m_tile_properties.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
const TileProperty& WorldGrid::tile_property (const TileIndex* parIndex) {
|
const TileProperty& WorldGrid::tile_property (const TileIndex* parIndex) const {
|
||||||
assert(parIndex);
|
assert(parIndex);
|
||||||
assert(static_cast<size_t>(*parIndex) < m_tile_properties.size());
|
assert(static_cast<size_t>(*parIndex) < m_tile_properties.size());
|
||||||
return m_tile_properties[static_cast<size_t>(*parIndex)];
|
return m_tile_properties[static_cast<size_t>(*parIndex)];
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace curry {
|
||||||
void add_layer (vec2us parWorldSize, const std::vector<TileIndex>& parLayer);
|
void add_layer (vec2us parWorldSize, const std::vector<TileIndex>& parLayer);
|
||||||
void set_layers (vec2us parWorldSize, const std::vector<std::vector<TileIndex>>& parLayers);
|
void set_layers (vec2us parWorldSize, const std::vector<std::vector<TileIndex>>& parLayers);
|
||||||
void set_tile_properties (const std::vector<TileProperty>& parProperties);
|
void set_tile_properties (const std::vector<TileProperty>& parProperties);
|
||||||
const TileProperty& tile_property (const TileIndex* parIndex);
|
const TileProperty& tile_property (const TileIndex* parIndex) const;
|
||||||
void unload_layers();
|
void unload_layers();
|
||||||
WorldSizeWatcherTicket register_observer (WorldSizeNotifiable* parWatcher);
|
WorldSizeWatcherTicket register_observer (WorldSizeNotifiable* parWatcher);
|
||||||
void unregister_observer (WorldSizeWatcherTicket parTicket);
|
void unregister_observer (WorldSizeWatcherTicket parTicket);
|
||||||
|
|
Loading…
Add table
Reference in a new issue