mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 16:44:58 +01:00
refactor(sonar): make narrowing conversions explicit (cpp:S5276)
This commit is contained in:
2
gl/ubo.h
2
gl/ubo.h
@@ -29,7 +29,7 @@ namespace gl
|
||||
void update(const uint8_t *data, int offset, GLsizeiptr size);
|
||||
template <typename T> void update(const T &data, size_t offset = 0)
|
||||
{
|
||||
update(reinterpret_cast<const uint8_t*>(&data), offset, sizeof(data));
|
||||
update(reinterpret_cast<const uint8_t*>(&data), static_cast<int>(offset), sizeof(data));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user