summaryrefslogtreecommitdiff
path: root/gfx/models
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-01-08 16:34:43 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-01-08 16:34:43 +0000
commit8cd0977a3688fa705c83867c57505a47b9269369 (patch)
treeb7b48711051299607077ed31fdf3b3f6dd6cc41f /gfx/models
parentTidy shadow map creation (diff)
downloadilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.bz2
ilt-8cd0977a3688fa705c83867c57505a47b9269369.tar.xz
ilt-8cd0977a3688fa705c83867c57505a47b9269369.zip
Fix up all the static analyzer warnings
Diffstat (limited to 'gfx/models')
-rw-r--r--gfx/models/texture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp
index 942cedf..ef6d7e7 100644
--- a/gfx/models/texture.cpp
+++ b/gfx/models/texture.cpp
@@ -48,8 +48,8 @@ Texture::save(const glTexture & texture, GLenum format, GLenum type, const glm::
{
using TGAHead = std::array<short, 9>;
- size_t dataSize = (static_cast<size_t>(size.x * size.y * channels));
- size_t fileSize = dataSize + sizeof(TGAHead);
+ const size_t dataSize = (static_cast<size_t>(size.x * size.y * channels));
+ const size_t fileSize = dataSize + sizeof(TGAHead);
filesystem::fh out {path, O_RDWR | O_CREAT, 0660};
out.truncate(fileSize);