[msvc] Fix warnings, mainly casting to smaller types (#270)
If the checks by GitHub Actions checks are met, then it seems good to go. Thanks for supporting FOSS4G!
This commit is contained in:
@@ -489,6 +489,11 @@ GLint components(const gfx::AttributeDataType type) {
|
||||
|
||||
} // namespace
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4312) // reinterpret_cast different size
|
||||
#endif
|
||||
|
||||
void VertexAttribute::Set(const Type& binding, Context& context, AttributeLocation location) {
|
||||
if (binding) {
|
||||
context.vertexBuffer = reinterpret_cast<const gl::VertexBufferResource&>(*binding->vertexBufferResource).buffer;
|
||||
@@ -505,6 +510,10 @@ void VertexAttribute::Set(const Type& binding, Context& context, AttributeLocati
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
const constexpr PixelStorePack::Type PixelStorePack::Default;
|
||||
|
||||
void PixelStorePack::Set(const Type& value) {
|
||||
|
||||
Reference in New Issue
Block a user