Bit of const cleanup

This commit is contained in:
2024-12-02 22:30:41 -06:00
parent 7989be5fe7
commit 68fab7c94d
15 changed files with 16 additions and 72 deletions

View File

@@ -132,7 +132,7 @@ float_t Camera::lookAtPixelPerfect(
);
}
void Camera::setRenderTarget(std::shared_ptr<RenderTarget> renderTarget) {
void Camera::setRenderTarget(const std::shared_ptr<RenderTarget> renderTarget) {
onResizeListener();
this->renderTarget = renderTarget;
this->onResizeListener = this->getRenderTarget()->onResize.listen([&](

View File

@@ -8,7 +8,7 @@
#include "display/RenderTarget.hpp"
namespace Dawn {
enum CameraType {
enum class CameraType {
PERSPECTIVE,
ORTHOGONAL
};
@@ -77,6 +77,6 @@ namespace Dawn {
*
* @param renderTarget The render target to set.
*/
void setRenderTarget(std::shared_ptr<RenderTarget> renderTarget);
void setRenderTarget(const std::shared_ptr<RenderTarget> renderTarget);
};
}

View File

@@ -30,7 +30,9 @@ std::shared_ptr<Texture> SimpleTexturedMaterial::getTexture() {
return this->texture;
}
void SimpleTexturedMaterial::setTexture(std::shared_ptr<Texture> texture) {
void SimpleTexturedMaterial::setTexture(
const std::shared_ptr<Texture> texture
) {
this->texture = texture;
}

View File

@@ -34,7 +34,7 @@ namespace Dawn {
*
* @param texture The texture to set.
*/
void setTexture(std::shared_ptr<Texture> texture);
void setTexture(const std::shared_ptr<Texture> texture);
/**
* Sets the color of this material.