mirror of
https://github.com/Relintai/props.git
synced 2024-11-12 10:15:25 +01:00
Make Ref parameters references wherever possible in TiledWallData.
This commit is contained in:
parent
acf1af1e77
commit
b311a2656c
@ -56,12 +56,12 @@ Ref<Texture> TiledWallData::get_texture(const int index) const {
|
||||
|
||||
return _textures.get(index);
|
||||
}
|
||||
void TiledWallData::set_texture(const int index, const Ref<Texture> texture) {
|
||||
void TiledWallData::set_texture(const int index, const Ref<Texture> &texture) {
|
||||
ERR_FAIL_INDEX(index, _textures.size());
|
||||
|
||||
_textures.set(index, texture);
|
||||
}
|
||||
void TiledWallData::add_texture(const Ref<Texture> texture) {
|
||||
void TiledWallData::add_texture(const Ref<Texture> &texture) {
|
||||
_textures.push_back(texture);
|
||||
}
|
||||
void TiledWallData::remove_texture(const int index) {
|
||||
@ -100,12 +100,12 @@ Ref<Texture> TiledWallData::get_flavour_texture(const int index) const {
|
||||
|
||||
return _flavour_textures.get(index);
|
||||
}
|
||||
void TiledWallData::set_flavour_texture(const int index, const Ref<Texture> texture) {
|
||||
void TiledWallData::set_flavour_texture(const int index, const Ref<Texture> &texture) {
|
||||
ERR_FAIL_INDEX(index, _flavour_textures.size());
|
||||
|
||||
_flavour_textures.set(index, texture);
|
||||
}
|
||||
void TiledWallData::add_flavour_texture(const Ref<Texture> texture) {
|
||||
void TiledWallData::add_flavour_texture(const Ref<Texture> &texture) {
|
||||
_flavour_textures.push_back(texture);
|
||||
}
|
||||
void TiledWallData::remove_flavour_texture(const int index) {
|
||||
|
@ -61,8 +61,8 @@ public:
|
||||
|
||||
//textures
|
||||
Ref<Texture> get_texture(const int index) const;
|
||||
void set_texture(const int index, const Ref<Texture> texture);
|
||||
void add_texture(const Ref<Texture> texture);
|
||||
void set_texture(const int index, const Ref<Texture> &texture);
|
||||
void add_texture(const Ref<Texture> &texture);
|
||||
void remove_texture(const int index);
|
||||
|
||||
int get_texture_count() const;
|
||||
@ -72,8 +72,8 @@ public:
|
||||
|
||||
//flavour_textures
|
||||
Ref<Texture> get_flavour_texture(const int index) const;
|
||||
void set_flavour_texture(const int index, const Ref<Texture> texture);
|
||||
void add_flavour_texture(const Ref<Texture> texture);
|
||||
void set_flavour_texture(const int index, const Ref<Texture> &texture);
|
||||
void add_flavour_texture(const Ref<Texture> &texture);
|
||||
void remove_flavour_texture(const int index);
|
||||
|
||||
int get_flavour_texture_count() const;
|
||||
|
Loading…
Reference in New Issue
Block a user