Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
gtk
gtk
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,133
    • Issues 1,133
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 147
    • Merge Requests 147
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gtkgtk
  • Merge Requests
  • !3247

Closed
Created Mar 02, 2021 by Chun-wei Fan@fanc999Developer
  • Report abuse
Report abuse

gskngltexturelibraryprivate.h: Fix build on Visual Studio

  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

Hi,

From the commit message:

The GskNglTextureAtlasEntry structure is used as a member in two other structures in two Gsk private headers, namely GskNglGlyphValue and GskNglIconData, but the build breaks on Visual Studio since GskNglTextureAtlasEntry contains a last member that is a zero-sized array that is normally OK if it is the last member of structure -or- if the structure that contains a GskNglTextureAtlasEntry structure as its last member. Otherwise, a GCCism is involved here.

Fix the build on Visual Studio compilers by not using a zero-sized array as a last member of GskNglTextureAtlasEntry, on Visual Studio compilers.

I understand that this will mean a bit of more memory use on Visual Studio builds.

As an alternative, please let me know if it is preferable to switch the order of the members of the GskNglGlyphValue and GskNglIconData structures instead--I did not do that because I am not sure things will work as intended, especially on other platforms.

For both approaches, it seems to me the gsk/OpenGL tests ran fine on the Visual Studio 2015 x64 builds

With blessings, thank you!

Edited Mar 02, 2021 by Chun-wei Fan
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix.ngl.msvc